thread-sphere/Makefile
2024-11-16 19:22:55 +01:00

16 lines
778 B
Makefile

APP = thread-sphere
DOMAIN = threadsphere.com
build:
docker build -t $(APP) .
docker save -o $(APP).tar $(APP)
install:
openssl genrsa -out /etc/ssl/private/$(APP).key 2048
openssl req -new -key /etc/ssl/private/$(APP).key -out /etc/ssl/certs/$(APP).csr -config openssl.cnf
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
cp nginx.cnf /etc/nginx/sites-enabled/$(APP)
echo "\nzone \"$(DOMAIN)\" {\n type master;\n file \"/etc/bind/db.$(DOMAIN)\";\n};" | tee -a /etc/bind/named.conf.local
cp zonefile.cnf /etc/bind/db.$(DOMAIN)
docker load -i $(APP).tar
docker run -p 5000:5000 --name $(APP) --restart always -d $(APP)