add nginx docer image, add certbote image, set settings for

This commit is contained in:
valitovgaziz
2025-05-07 16:21:30 +05:00
parent c86d4bbf41
commit 44a6725a8e
5 changed files with 67 additions and 18 deletions
+16 -9
View File
@@ -41,19 +41,26 @@ services:
command: goose up
spa:
build:
context: ./spa
dockerfile: Dockerfile
build: .
env_file:
- .env
ports:
- "${OUTERPORT}:${INNERPORT}"
- "${HTTP}:${HTTP}"
- "${HTTPS}:${HTTPS}"
volumes:
- ./data/nginx/conf.d:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- api
- db
- migrator
volumes:
api:
postgres-db:
goose:
- certbot
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
restart: unless-stopped