homelab/archives/server/portfolio/docker-compose.yml

54 lines
1.3 KiB
YAML

version: '3.1'
services:
portfolio:
image: wordpress
container_name: wordpress_portfolio
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
restart: "no"
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
portfolio_db:
image: mysql:5.7
container_name: wordpress_portfolio-db
restart: "no"
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
networks:
web:
external: true
portfolio: