-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
107 lines (100 loc) · 3.79 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "3.8"
services:
php:
build:
context: .
dockerfile: docker/dk.php.Dockerfile
args:
PHP_VERSION: 8.1-dev
restart: 'no'
environment:
WORDPRESS_SITE_URL: https://${APP_NAME:-sword}.localhost
WORDPRESS_DB_NAME: sword_app
WORDPRESS_DB_USER: user
WORDPRESS_DB_PASSWORD: user
WORDPRESS_DB_HOST: mysql
WORDPRESS_AUTH_KEY: ChangeMe
WORDPRESS_SECURE_AUTH_KEY: ChangeMe
WORDPRESS_LOGGED_IN_KEY: ChangeMe
WORDPRESS_NONCE_KEY: ChangeMe
WORDPRESS_AUTH_SALT: ChangeMe
WORDPRESS_SECURE_AUTH_SALT: ChangeMe
WORDPRESS_LOGGED_IN_SALT: ChangeMe
WORDPRESS_NONCE_SALT: ChangeMe
WORDPRESS_DEBUG: 'true'
WORDPRESS_DEBUG_DISPLAY: 'false'
WORDPRESS_CONFIG_EXTRA: define('WP_ENVIRONMENT_TYPE', 'development');
volumes:
- ./:/var/www/html
- ./docker/dev/php/config.ini:/etc/php81/conf.d/99_dev.ini:ro
extra_hosts:
- host.docker.internal:host-gateway
nginx:
build:
context: .
dockerfile: docker/dk.nginx.Dockerfile
restart: 'no'
volumes:
- ./public/:/var/www/html/public:ro
- ./wp/:/var/www/html/wp:ro
depends_on:
- php
- traefik
networks:
- default
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.${APP_NAME:-sword}.rule=Host(`${APP_NAME:-sword}.localhost`)
- traefik.http.routers.${APP_NAME:-sword}.tls=true
- traefik.http.routers.${APP_NAME:-sword}.entrypoints=websecure
- traefik.http.services.${APP_NAME:-sword}.loadbalancer.server.port=80
mysql:
image: mysql:8.0.37
restart: 'no'
environment:
- MYSQL_USER=user
- MYSQL_PASSWORD=user
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=sword_app
volumes:
- mysql_data:/var/lib/mysql
mailer:
image: maildev/maildev
restart: 'no'
networks:
- default
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.${APP_NAME:-sword}-mail.rule=Host(`${APP_NAME:-sword}-mail.localhost`)
- traefik.http.routers.${APP_NAME:-sword}-mail.tls=true
- traefik.http.routers.${APP_NAME:-sword}-mail.entrypoints=websecure
- traefik.http.services.${APP_NAME:-sword}-mail.loadbalancer.server.port=1080
- traefik.tcp.routers.${APP_NAME:-sword}-smtp.rule=HostSNI(`${APP_NAME:-sword}-smtp.localhost`)
- traefik.tcp.routers.${APP_NAME:-sword}-smtp.entrypoints=smtpsecure
- traefik.tcp.routers.${APP_NAME:-sword}-smtp.tls=true
- traefik.tcp.routers.${APP_NAME:-sword}-smtp.service=${APP_NAME:-sword}-smtp
- traefik.tcp.services.${APP_NAME:-sword}-smtp.loadbalancer.server.port=1025
traefik:
image: traefik:2.11
ports:
- '443:443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik
command:
- --providers.docker
- --providers.docker.exposedbydefault=false
- --providers.docker.network=${PROJECT_DIR:-sword}_traefik
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.websecure.address=:443
- --entrypoints.smtp.address=:25
- --entrypoints.smtpsecure.address=:465
volumes:
mysql_data:
networks:
traefik: