This commit is contained in:
Patrick 2024-11-13 19:53:49 +01:00
parent 9487c231a5
commit 88bced60b7
2 changed files with 5 additions and 4 deletions

View file

@ -1,13 +1,14 @@
APP = jet-search
DOMAIN = jetsearch.com
build:
docker build -t $(APP) .
docker save -o $(APP).tar $(APP)
install:
openssl genrsa -out /etc/ssl/private/$(APP).key 2048
openssl genrsa -out /etc/ssl/private/$(APP).key 2048 -subj '/C=CH/ST=Zurich/L=Zurich/O=InterstellarNet/OU=NONE/CN=$(DOMAIN)
openssl req -new -key /etc/ssl/private/$(APP).key -out /etc/ssl/certs/$(APP).csr
openssl x509 -req -in /etc/ssl/certs/$(APP).csr -CA /root/ca.crt -CAkey ca.key -CAcreateserial -out /etc/ssl/certs/$(APP).crt -days 500 -sha256
openssl x509 -req -in /etc/ssl/certs/$(APP).csr -CA /root/ca.crt -CAkey /root/ca.key -CAcreateserial -out /etc/ssl/certs/$(APP).crt -days 500 -sha256'
cp nginx /etc/nginx/sites-enabled/$(APP)
docker load -i $(APP).tar
docker run -p 5000:5000 --name $(APP) --restart always -d $(APP)

4
nginx
View file

@ -1,13 +1,13 @@
server {
listen 80;
server_name jetsearch.com www.jetsearch.com;
server_name jetsearch.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name jetsearch.com www.jetsearch.com;
server_name jetsearch.com;
ssl_certificate /path/to/your/certificate.crt;
ssl_certificate_key /path/to/your/private.key;