-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-local.yml
More file actions
49 lines (46 loc) · 1.23 KB
/
docker-compose-local.yml
File metadata and controls
49 lines (46 loc) · 1.23 KB
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
39
40
41
42
43
44
45
46
47
48
49
services:
wordpress:
image: wordpress
restart: always
env_file: .env
volumes:
- ./wordpress/src:/var/www/html
labels:
- "traefik.enable=true"
- "traefik.http.routers.wordpress.rule=Host(`localhost`)"
- "traefik.http.routers.wordpress.entrypoints=web"
- "traefik.http.services.wordpress.loadbalancer.server.port=80"
db:
image: mariadb
container_name: db
restart: always
volumes:
- db_data:/var/lib/mysql
- ./db/my.cnf:/etc/mysql/my.cnf
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
- "--innodb-read-only-compressed=OFF"
env_file: .env
environment:
- MYSQL_USER=${WORDPRESS_DB_USER}
- MYSQL_PASSWORD=${WORDPRESS_DB_PASSWORD}
- MYSQL_DATABASE=${WORDPRESS_DB_NAME}
- MYSQL_ALLOW_EMPTY_PASSWORD=0
- TZ=Europe/Paris
labels:
- "traefik.enable=false"
traefik:
image: traefik:v2.10
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8081:8080" # Dashboard
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes:
db_data:
driver: local