-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (35 loc) · 1.05 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: "3.8"
services:
wordpress:
image: anideaforbusiness/wordpress-superoptimized:latest
container_name: wordpress-superoptimized
environment:
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
volumes:
- wordpress_data:/var/www/html
- plugins_data:/var/www/html/wp-content/plugins
- themes_data:/var/www/html/wp-content/themes
depends_on:
- db
labels:
- "traefik.enable=true"
- "traefik.http.routers.wordpress.rule=Host(`${WORDPRESS_DOMAIN}`)"
- "traefik.http.services.wordpress.loadbalancer.server.port=80"
db:
image: mariadb:latest
container_name: mariadb
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- db_data:/var/lib/mysql
volumes:
wordpress_data:
plugins_data:
themes_data:
db_data: