-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.53 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.53 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
50
51
52
53
54
55
56
57
services:
ap-ks-wordpress:
build:
context: .
dockerfile: docker/Dockerfile
target: dev
restart: unless-stopped
environment:
DATABASE_URL: 'mysql://wp:password@ap-ks-db:3306/wp'
volumes:
- .:/app
- ./docker/data/Caddyfile:/etc/caddy/Caddyfile
- ./docker/data/php.local.ini:/usr/local/etc/php/conf.d/php.local.ini
networks:
traefik: ~
app-net: ~
labels:
- "traefik.enable=true"
- "traefik.http.routers.ap-ks.rule=Host(`wordpress-template.local`)"
- "traefik.http.routers.ap-ks-https.rule=Host(`wordpress-template.local`)"
- "traefik.http.routers.ap-ks-https.tls=true"
healthcheck:
# healthchecks on the app container are generally useless for dev environments.
disable: true
# not using curl -f for dev, since a 500 error keeps the container from appearing in traefik
test: ["CMD", "curl", "http://localhost/"]
timeout: 2s
retries: 10
start_period: 10s
start_interval: 1s
ap-ks-db:
image: mysql:8.4.5
restart: unless-stopped
environment:
MYSQL_DATABASE: wp
MYSQL_USER: wp
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
volumes:
- ap-ks-db:/var/lib/mysql
networks:
app-net: ~
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-ppassword"]
timeout: 2s
retries: 10
start_period: 10s
start_interval: 1s
volumes:
ap-ks-db:
networks:
app-net: ~
traefik:
external: true