-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (72 loc) · 1.69 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# ./docker-compose.yml
services:
nginx:
container_name: ${SITENAME:-wordpress}-nginx
build:
context: .
dockerfile: docker/nginx/Dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
ports:
- "8080:80"
networks:
- internal
volumes:
- ./data:/var/www/html
- ./logs/nginx:/var/log/nginx
php:
container_name: ${SITENAME:-wordpress}-php
build:
context: .
dockerfile: docker/php/Dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
networks:
- internal
volumes:
- ./data:/var/www/html
- ./logs/php.log:/var/log/fpm-php.www.log
mariadb:
container_name: ${SITENAME:-wordpress}-mariadb
image: mariadb:10.7
ports:
- 3306:3306
volumes:
- ./db_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_PASSWORD=password
- MYSQL_USER=user
- MYSQL_DATABASE=database
networks:
- internal
wpcli:
container_name: ${SITENAME:-wordpress}-cli
depends_on:
- nginx
- php
image: wordpress:cli
command: tail -f /dev/null
volumes:
- ./data:/var/www/html
user: "${UID:-1000}:${GID:-1000}"
environment:
WORDPRESS_DB_HOST: mariadb:3306
WORDPRESS_DB_USER: user
WORDPRESS_DB_PASSWORD: password
WORDPRESS_DB_NAME: database
networks:
- internal
mailhog:
container_name: ${SITENAME:-wordpress}-mailhog
image: mailhog/mailhog
networks:
- internal
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui
networks:
internal:
driver: bridge