87 lines
1.8 KiB
YAML
87 lines
1.8 KiB
YAML
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
dbdata:
|
|
|
|
services:
|
|
nginx:
|
|
build:
|
|
context: ./nginx
|
|
dockerfile: Dockerfile
|
|
container_name: nginx
|
|
env_file: ./.env
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
- icecast2
|
|
networks:
|
|
- app-network
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
volumes:
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
- ./certbot/www:/var/www/certbot
|
|
|
|
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 ${EMAIL} -d ${DOMAIN} -d www.${DOMAIN} --agree-tos --non-interactive
|
|
networks:
|
|
- app-network
|
|
|
|
certbot-renew:
|
|
image: certbot/certbot
|
|
container_name: certbot-renew
|
|
volumes:
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
- ./certbot/www:/var/www/certbot
|
|
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
|
|
networks:
|
|
- app-network
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: "${BACKEND_HOST}"
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- app-network
|
|
env_file:
|
|
- ./.env
|
|
volumes:
|
|
- ./backend/token/:/backend/token
|
|
- ${OBSIDIAN_DIR}:/backend/notes
|
|
|
|
db:
|
|
image: postgres:16
|
|
container_name: "${POSTGRES_HOST}"
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./.env
|
|
networks:
|
|
- app-network
|
|
volumes:
|
|
- dbdata:/var/lib/postgresql/data
|
|
|
|
icecast2:
|
|
build:
|
|
context: ./icecast2
|
|
dockerfile: Dockerfile
|
|
container_name: "${ICECAST_HOST}"
|
|
restart: always
|
|
networks:
|
|
- app-network
|
|
env_file:
|
|
- ./.env
|
|
ports:
|
|
- "${ICECAST_PORT}:${ICECAST_PORT}"
|