infrastructure/docker-compose.yml

157 lines
3.7 KiB
YAML
Raw Normal View History

version: "3.8"
services:
webserver:
depends_on:
- wordpress
image: nginx:1.23
container_name: webserver
profiles:
- webserver
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- wordpress:/var/www/html
- ./nginx-conf:/etc/nginx/conf.d
- certbot-etc:/etc/letsencrypt:ro
networks:
- app-network
wp_db:
image: mariadb:10.10.2
container_name: wp_db
profiles:
- wp_db
restart: unless-stopped
env_file:
- env/wp_database.env
volumes:
- dbdata:/var/lib/mysql
networks:
- app-network
wordpress:
depends_on:
- wp_db
image: wordpress:6.1.1-php8.1-fpm
container_name: wordpress
profiles:
- wordpress
restart: unless-stopped
env_file:
- env/wordpress.env
# environment:
# - WORDPRESS_DB_HOST=wp_db:3306
volumes:
- wordpress:/var/www/html
networks:
- app-network
flask_website:
build:
context: ./bensuperpc_website
dockerfile: Dockerfile
container_name: flask_website
profiles:
- flask_website
depends_on:
- flask_db
volumes:
- ./bensuperpc_website:/app:rw
env_file:
- env/flask_website.env
restart: unless-stopped
ports:
- 5000:5000
networks:
- app-network
flask_db:
image: postgres:latest
container_name: flask_db
profiles:
- flask_db
restart: unless-stopped
env_file:
- env/flask_database.env
# ports:
# - 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
profiles:
- qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- WEBUI_PORT=8080
volumes:
# - /path/to/appdata/config:/config
- downloads:/downloads
#ports:
# - 8080:8080
# - 6881:6881
# - 6881:6881/udp
restart: unless-stopped
networks:
- app-network
certbot:
depends_on:
- webserver
image: certbot/certbot:v1.32.0
container_name: certbot
profiles:
- certbot
volumes:
- certbot-etc:/etc/letsencrypt
- wordpress:/var/www/html
#command: certonly --webroot --webroot-path=/var/www/html --email bensuperpc@bensuperpc.fr --agree-tos --rsa-key-size 4096 --no-eff-email --verbose --noninteractive --staging --domain www.bensuperpc.org --domain bensuperpc.org
#command: certonly --webroot --webroot-path=/var/www/html --email bensuperpc@bensuperpc.fr --agree-tos --rsa-key-size 4096 --no-eff-email --verbose --force-renewal --domain www.bensuperpc.org --domain bensuperpc.org
command: certonly --webroot --webroot-path=/var/www/html --email bensuperpc@bensuperpc.fr --agree-tos --rsa-key-size 4096 --no-eff-email --verbose --noninteractive --keep-until-expiring --domain www.bensuperpc.org --domain bensuperpc.org
phpmyadmin:
image: phpmyadmin:5.2.0
container_name: phpmyadmin
profiles:
- phpmyadmin
restart: unless-stopped
env_file:
- env/phpmyadmin.env
depends_on:
- wp_db
networks:
- app-network
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4:6.16
profiles:
- pgadmin
restart: unless-stopped
env_file:
- env/pgadmin.env
depends_on:
- flask_db
networks:
- app-network
volumes:
certbot-etc:
name: certbot-etc
wordpress:
name: wordpress
dbdata:
name: dbdata
downloads:
name: downloads
postgres-data:
name: postgres-data
networks:
app-network:
driver: bridge
name: app-network