ci/cd + https + front

This commit is contained in:
arrelin
2025-12-16 11:55:28 +03:00
parent 0115f7674c
commit 05bab6e620
17 changed files with 463 additions and 72 deletions

View File

@@ -21,8 +21,7 @@ services:
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
RUST_LOG: ${RUST_LOG:-info}
ports:
- "8080:8080"
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:5173}
depends_on:
- postgres
networks:
@@ -31,16 +30,44 @@ services:
frontend:
image: ghcr.io/${OWNER:-${COMPOSE_PROJECT_NAME}}/family_budget-frontend:latest
container_name: family_budget_frontend
ports:
- "80:80"
depends_on:
- backend
networks:
- app_network
nginx:
image: nginx:alpine
container_name: family_budget_nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- certbot_www:/var/www/certbot:ro
- certbot_conf:/etc/letsencrypt:ro
depends_on:
- backend
- frontend
networks:
- app_network
restart: unless-stopped
certbot:
image: certbot/certbot
container_name: family_budget_certbot
volumes:
- certbot_www:/var/www/certbot:rw
- certbot_conf:/etc/letsencrypt:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
postgres_data:
driver: local
certbot_www:
driver: local
certbot_conf:
driver: local
networks:
app_network: