56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
services:
|
|
nginx:
|
|
container_name: nginx
|
|
restart: unless-stopped
|
|
image: nginx
|
|
networks:
|
|
- app-network
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
- ./certbot/www:/var/www/certbot
|
|
- ./html/:/etc/nginx/html:ro
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
container_name: certbot
|
|
volumes:
|
|
- ./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:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: backend
|
|
restart: unless-stopped
|
|
# ports:
|
|
# - "${BACKEND_PORT}:8080"
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- app-network
|
|
|
|
db:
|
|
image: postgres:16
|
|
container_name: "${POSTGRES_HOST}"
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: "${POSTGRES_USER}"
|
|
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
|
|
POSTGRES_DB: "${POSTGRES_DB}"
|
|
# ports:
|
|
# - "${DB_PORT}:5432"
|
|
networks:
|
|
- app-network
|