76 lines
1.5 KiB
YAML
76 lines
1.5 KiB
YAML
services:
|
|
frontend:
|
|
image: nginx:1.27-alpine
|
|
container_name: attendance-frontend
|
|
restart: always
|
|
volumes:
|
|
- ./frontend:/usr/share/nginx/html:ro
|
|
networks:
|
|
- attendance-net
|
|
|
|
backend:
|
|
build: ./backend
|
|
container_name: attendance-backend
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- attendance-net
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: attendance-db
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
networks:
|
|
- attendance-net
|
|
|
|
adminer:
|
|
image: adminer:4
|
|
container_name: attendance-adminer
|
|
restart: always
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- attendance-net
|
|
|
|
nginx:
|
|
image: nginx:1.27-alpine
|
|
container_name: attendance-proxy
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/app.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./certbot/www:/var/www/certbot
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
- nginx_logs:/var/log/nginx
|
|
depends_on:
|
|
- frontend
|
|
- backend
|
|
- adminer
|
|
networks:
|
|
- attendance-net
|
|
|
|
certbot:
|
|
image: certbot/certbot:latest
|
|
container_name: attendance-certbot
|
|
volumes:
|
|
- ./certbot/www:/var/www/certbot
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
|
|
volumes:
|
|
postgres_data:
|
|
nginx_logs:
|
|
|
|
networks:
|
|
attendance-net:
|
|
driver: bridge
|