This commit is contained in:
valentin
2023-03-22 11:32:16 +01:00
parent 63ca655202
commit 0fa8ee7b6e
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
version: '3.7'
services:
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
wordpress:
image: wordpress:latest
restart: always
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=${MYSQL_USER}
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
- WORDPRESS_DB_NAME=${MYSQL_DATABASE}
networks:
- traefik_web
labels:
- traefik.enable=true
- traefik.http.routers.${APP_HOST}-router.entrypoints=web
- traefik.http.routers.${APP_HOST}-router.rule=Host(`${APP_HOST}`)
volumes:
db_data:
networks:
traefik_web:
external: true