adding environment variables

This commit is contained in:
2025-11-20 18:04:57 +00:00
parent 9aabff9752
commit 22d0cb7f79
3 changed files with 41 additions and 14 deletions

View File

@@ -3,6 +3,8 @@ services:
container_name: nginx
restart: unless-stopped
image: nginx
networks:
- app-network
ports:
- 80:80
- 443:443
@@ -19,6 +21,8 @@ services:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
command: certonly --webroot -w /var/www/certbot --email adam.a.french@outlook.com -d adam-french.co.uk --agree-tos
networks:
- app-network
backend:
build:
@@ -26,16 +30,22 @@ services:
dockerfile: Dockerfile
container_name: backend
restart: unless-stopped
ports:
- 8080:8080
# ports:
# - "${BACKEND_PORT}:8080"
depends_on:
- db
networks:
- app-network
db:
image: postgres:16
container_name: db
container_name: "${POSTGRES_HOST}"
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: db
ports:
- 5432:5432
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
# ports:
# - "${DB_PORT}:5432"
networks:
- app-network