1
0
inception/srcs/docker-compose.yml

168 lines
3.8 KiB
YAML

name: inception
volumes:
wp-db:
wp-site:
nginx-certs:
backup:
networks:
inception:
external: false
services:
nginx:
container_name: inception-nginx
build:
context: .
dockerfile: docker/nginx/Dockerfile
networks:
- inception
environment:
- TZ=Europe/Paris
- NGINX_PHP_HOST=inception-wordp-php
- NGINX_SSL_KEY_FILE=/etc/nginx/ssl/adjoly-wp.key
- NGINX_SSL_CERT_FILE=/etc/nginx/ssl/adjoly-wp.crt
depends_on:
wordpress-php:
condition: service_healthy
db:
condition: service_healthy
volumes:
- wp-site:/var/www/wordpress
- ./configs/nginx/templates:/etc/nginx/templates
- ./configs/nginx/entry:/docker-entrypoint.d
- nginx-certs:/etc/nginx/ssl
ports:
- "8443:8443"
restart: unless-stopped
wordpress-php:
container_name: inception-wordp-php
build:
context: .
dockerfile: docker/wordpress/Dockerfile
networks:
- inception
depends_on:
db:
condition: service_healthy
environment:
- WP_DB_NAME=knl
- WP_DB_USER=kanel
- WP_DB_PASS=alpine
- WP_DB_HOST=db
- WP_ADMIN_EMAIL=contact@kanel.ovh
- WP_ADMIN_USER=kanel
- WP_ADMIN_PASS=alpine
- WP_URL=localhost:8443
- WP_TITLE=Kanel Supremacy
- WP_SEARCH_ENGINE_VISIBILITY=false
- PHP_MEMORY_LIMIT="512M"
- PHP_MAX_UPLOAD="50M"
- PHP_PORT=9000
- REDIS_HOSTNAME=redis
- REDIS_PORT=6379
- TZ=Europe/Paris
volumes:
- wp-site:/var/www/wordpress
- ./configs/wordpress/entry:/docker-entrypoint.d
restart: unless-stopped
db:
container_name: inception-db
build:
context: .
dockerfile: docker/mariadb/Dockerfile
networks:
- inception
environment:
- MYSQL_ROOT_PASSWORD="alpine"
- MYSQL_PASSWORD="alpine"
- MYSQL_USER="kanel"
- MYSQL_DATABASE="knl"
- TZ=Europe/Paris
volumes:
- wp-db:/var/lib/mysql
restart: unless-stopped
static-site:
build: docker/bonus/static-site
container_name: inception-kanel-supremacy
ports:
- 8080:443
depends_on:
- nginx
environment:
- TZ=Europe/Paris
- NGINX_SSL_KEY_FILE=/etc/nginx/ssl/kanel-wp.key
- NGINX_SSL_CERT_FILE=/etc/nginx/ssl/kanel-wp.crt
restart: unless-stopped
backup:
build:
context: .
dockerfile: docker/bonus/borg-backup/Dockerfile
container_name: inception-backup
networks:
- inception
environment:
- TZ=Europe/Paris # handled by tzdata
- CRON_INTERVAL=0 2 * * * # handled by entrypoint
- BORG_PASSPHRASE=Hanky-Kangaroo-Thinning5-Statute-Mascot-Islamist
- BORG_COMPRESS=
- BORG_PRUNE_KEEP_DAILY=3
- BORG_PRUNE_KEEP_WEEKLY=2
- BORG_PRUNE_KEEP_MONTHLY=1
- BORG_LOG_LEVEL=info
- BORG_CHECK_LAST=3
- BORG_CHECK_DATA=1
depends_on:
nginx:
condition: service_healthy
volumes:
- wp-db:/source/db
- wp-site:/source/wordpress
- backup:/backup
restart: unless-stopped
adminer:
build:
context: .
dockerfile: docker/bonus/adminer/Dockerfile
container_name: inception-adminer
networks:
- inception
ports:
- 8090:8080
depends_on:
db:
condition: service_healthy
restart: unless-stopped
redis:
build:
context: .
dockerfile: docker/bonus/redis/Dockerfile
container_name: inception-redis
networks:
- inception
restart: unless-stopped
ftp:
build:
context: .
dockerfile: docker/bonus/vsftpd/Dockerfile
container_name: inception-ftp
networks:
- inception
environment:
- VSFTPD_USER=kanel
- VSFTPD_PASS=alpine
volumes:
- wp-site:/var/ftp
ports:
- 21:21
- 30000-30100:30000-30100
restart: unless-stopped