init
This commit is contained in:
5
wordpress/.env
Normal file
5
wordpress/.env
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
MYSQL_DATABASE=wordpress
|
||||||
|
MYSQL_ROOT_PASSWORD=wordpress
|
||||||
|
MYSQL_USER=wordpress
|
||||||
|
MYSQL_PASSWORD=wordpress
|
||||||
|
APP_HOST=wordpress.traefik.me
|
||||||
37
wordpress/docker-compose.yml
Normal file
37
wordpress/docker-compose.yml
Normal 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
|
||||||
Reference in New Issue
Block a user