Jafner.net/archive/docker_config/portfolio/docker-compose.yml

46 lines
1.3 KiB
YAML
Raw Normal View History

2021-03-01 11:45:53 -08:00
version: '3.1'
services:
2021-12-20 22:54:13 -08:00
portfolio:
image: wordpress
container_name: portfolio
restart: always
environment:
WORDPRESS_DB_HOST: portfolio_db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpressdb
volumes:
- ${DOCKER_DATA}/html:/var/www/html
labels:
- traefik.http.routers.portfolio.rule=Host(`portfolio.jafner.net`)
- traefik.http.routers.portfolio.tls=true
- traefik.http.routers.portfolio.tls.certresolver=lets-encrypt
- traefik.port=80
networks:
- web
- portfolio
depends_on:
- portfolio_db
2021-03-01 11:45:53 -08:00
2021-12-20 22:54:13 -08:00
portfolio_db:
image: mysql:5.7
container_name: portfolio_db
restart: always
networks:
- portfolio
environment:
MYSQL_DATABASE: wordpressdb
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- ${DOCKER_DATA}/db:/var/lib/mysql
labels:
- traefik.enable=false
2021-03-01 11:45:53 -08:00
networks:
2021-12-20 22:54:13 -08:00
web:
external: true
portfolio: