2024-11-12 22:07:35 +01:00
|
|
|
APP = jet-search
|
2024-11-13 19:53:49 +01:00
|
|
|
DOMAIN = jetsearch.com
|
2024-11-12 22:07:35 +01:00
|
|
|
|
|
|
|
build:
|
2024-11-12 22:10:06 +01:00
|
|
|
docker build -t $(APP) .
|
|
|
|
docker save -o $(APP).tar $(APP)
|
2024-11-12 22:07:35 +01:00
|
|
|
|
|
|
|
install:
|
2024-11-13 20:19:03 +01:00
|
|
|
openssl genrsa -out /etc/ssl/private/$(APP).key 2048
|
2024-11-15 16:47:17 +01:00
|
|
|
openssl req -new -key /etc/ssl/private/$(APP).key -out /etc/ssl/certs/$(APP).csr -config openssl.cnf
|
2024-11-15 21:19:03 +01:00
|
|
|
openssl x509 -req -in /etc/ssl/certs/$(APP).csr -CA /root/ca.crt -CAkey /root/ca.key -CAcreateserial -out /etc/ssl/certs/$(APP).crt -extfile openssl.cnf -extensions req_ext -days 500 -sha256
|
2024-11-15 16:47:17 +01:00
|
|
|
cp nginx.cnf /etc/nginx/sites-enabled/$(APP)
|
2024-11-15 17:21:59 +01:00
|
|
|
echo "\nzone \"jetsearch.com\" {\n type master;\n file \"/etc/bind/db.jetsearch.com\";\n};" | tee -a /etc/bind/named.conf.local
|
2024-11-15 16:47:17 +01:00
|
|
|
cp zonefile.cnf /etc/bind/db.$(DOMAIN)
|
2024-11-12 22:26:41 +01:00
|
|
|
docker load -i $(APP).tar
|
2024-11-12 22:14:16 +01:00
|
|
|
docker run -p 5000:5000 --name $(APP) --restart always -d $(APP)
|