Jafner.net/archive/self-hosting/wordpress/nvgm/docker-compose.yml

43 lines
1.4 KiB
YAML
Raw Normal View History

2020-12-15 19:42:45 -08:00
version: '3.1'
services:
nvgm:
image: wordpress
container_name: wordpress-nvgm
restart: always
environment:
WORDPRESS_DB_HOST: nvgm-db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpressdb
volumes:
- /home/joey/docker/wordpress/nvgm/html:/var/www/html
networks:
- web
- wordpress
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:nvgm.jafner.net"
- "traefik.port=80"
- "traefik.docker.network=web"
nvgm-db:
image: mysql:5.7
container_name: wordpress-nvgm-db
restart: always
networks:
- web
- wordpress
environment:
MYSQL_DATABASE: wordpressdb
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- /home/joey/docker/wordpress/nvgm/db:/var/lib/mysql
networks:
web:
external: true
wordpress: