blob: 4b4630fa188fdd6a2ca77a6611b78739aa63c8af (
plain)
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
|
services:
nginx:
build:
context: .
dockerfile: nginx.dockerfile
depends_on:
- php
- mysql
ports:
- 80:80
- 443:443
labels:
- "traefik.enable=true"
- "traefik.http.routers.wordpress.rule=Host(`yourdomain.com`)"
- "traefik.http.routers.wordpress.entrypoints=web"
- "traefik.http.services.wordpress.loadbalancer.server.port=80"
volumes:
- ./wordpress:/var/www/html
mysql:
image: mysql:latest
environment:
MYSQL_DATABASE: wp
MYSQL_USER: wp
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
php:
build:
context: .
dockerfile: php.dockerfile
volumes:
- ./wordpress:/var/www/html
wp:
build:
context: .
dockerfile: php.dockerfile
volumes:
- ./wordpress:/var/www/html
entrypoint: ['wp', '--allow-root']
|