-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
89 lines (80 loc) · 2.34 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
x-php: &php
build:
context: docker/php
dockerfile: php.dockerfile
args:
ENVIRONMENT: development
restart: unless-stopped
working_dir: /srv
volumes:
- .:/srv
- ~/.composer:/home/composer/.cache/composer
- ~/.composer/auth.json:/config/composer/auth.json
- ./vendor:/srv/vendor:delegated
services:
traefik:
image: traefik:v3.0
restart: unless-stopped
command: >-
--entryPoints.web.address=:80
--entryPoints.web.http.redirections.entrypoint.to=web-secure
--entryPoints.web.http.redirections.entrypoint.scheme=https
--entryPoints.web-secure.address=:443
--api=true
--api.dashboard=true
--providers.docker=true
--providers.docker.exposedByDefault=false
--providers.file.directory=/srv/configs
--providers.file.watch=true
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik:/srv
labels:
- traefik.enable=true
- traefik.http.routers.traefik.rule=Host(`traefik.docker.localhost`)
- traefik.http.routers.traefik.service=api@internal
- traefik.http.routers.traefik.tls=true
- traefik.http.services.traefik.loadBalancer.server.port=8080
php:
<<: *php
labels:
- traefik.enable=true
- traefik.http.routers.php.entryPoints=web-secure
- traefik.http.routers.php.rule=Host(`app.docker.localhost`) || Host(`api.docker.localhost`)
- traefik.http.routers.php.tls=true
queue:
<<: *php
command: php artisan horizon
scheduler:
<<: *php
command: supercronic /srv/docker/php/config/schedule.cron
mysql:
image: mysql:8.0-debian
restart: unless-stopped
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_DATABASE: $DB_DATABASE
MYSQL_ALLOW_EMPTY_PASSWORD: true
ports:
- "3306:3306"
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis-data:/data
mailpit:
image: axllent/mailpit:v1.12
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.mailpit.entryPoints=web-secure
- traefik.http.routers.mailpit.rule=Host(`mailpit.docker.localhost`)
- traefik.http.routers.mailpit.tls=true
- traefik.http.services.mailpit.loadBalancer.server.port=8025
volumes:
redis-data:
mysql-data: