86 lines
2.0 KiB
YAML
86 lines
2.0 KiB
YAML
networks:
|
|
inception:
|
|
name: inception
|
|
|
|
volumes:
|
|
db_data:
|
|
name: db_data
|
|
driver: local
|
|
driver_opts:
|
|
type: 'none'
|
|
o: 'bind'
|
|
device: '/data/db_data'
|
|
site_data:
|
|
name: site_data
|
|
driver: local
|
|
driver_opts:
|
|
type: 'none'
|
|
o: 'bind'
|
|
device: '/data/site_data'
|
|
|
|
services:
|
|
|
|
mariadb :
|
|
container_name : mariadb
|
|
build : ./mariadb/
|
|
networks :
|
|
- inception
|
|
restart: always
|
|
volumes :
|
|
- db_data:/var/lib/mysql
|
|
env_file:
|
|
- .env
|
|
environment :
|
|
- DB_USER=${DB_USER:-wp}
|
|
- DB_PWD=${DB_PWD:-password123}
|
|
- DB_ROOT_PWD=${DB_ROOT_PWD:-rootpassword}
|
|
|
|
wordpress :
|
|
container_name : wordpress
|
|
build : ./wordpress/
|
|
networks :
|
|
- inception
|
|
hostname : wordpress
|
|
depends_on :
|
|
- mariadb
|
|
restart: always
|
|
volumes :
|
|
- site_data:/var/www/wordpress
|
|
env_file:
|
|
- .env
|
|
environment :
|
|
- DB_USER=${DB_USER:-wp}
|
|
- DB_PWD=${DB_PWD:-password123}
|
|
- WP_USER=${WP_USER:-rralambo}
|
|
- WP_PWD=${WP_PWD:-password123}
|
|
- WP_EMAIL=${WP_EMAIL:-email@email.com}
|
|
- WP_ADMIN=${WP_ADMIN:-obama}
|
|
- WP_ADMIN_PWD=${WP_ADMIN_PWD:-thepresidentpassword}
|
|
- WP_ADMIN_EMAIL=${WP_ADMIN_EMAIL:-obama@obamail.com}
|
|
|
|
nginx:
|
|
container_name: nginx
|
|
image: nginx:latest
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
networks :
|
|
- inception
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
depends_on:
|
|
- wordpress
|
|
volumes:
|
|
- ./nginx/secure/:/etc/nginx/templates/
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- ./nginx/certbot/conf:/etc/letsencrypt
|
|
- ./nginx/certbot/www:/var/www/certbot
|
|
- ./nginx/99-autoreload.sh:/docker-entrypoint.d/99-autoreload.sh
|
|
|
|
# certbot:
|
|
# image: certbot/certbot
|
|
# volumes:
|
|
# - ./nginx/certbot/conf:/etc/letsencrypt
|
|
# - ./nginx/certbot/www:/var/www/certbot
|
|
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" |