-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
153 lines (153 loc) · 3.91 KB
/
compose.yaml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
services:
##################################################
# DB (MySQL)
##################################################
db:
image: "mysql:8.0"
restart: always
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: password
MYSQL_PASSWORD: password
MYSQL_USER: user
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
##################################################
# PHPMYADMIN
##################################################
phpmyadmin:
image: phpmyadmin:latest
environment:
PMA_HOST: db
PMA_USER: user
PMA_PASSWORD: password
##################################################
# OCTANE:FRANKENPHP
##################################################
app:
build:
target: common
restart: always
volumes:
- caddy_data:/data
- caddy_config:/config
entrypoint: ["php", "artisan", "octane:frankenphp", "--host=0.0.0.0"]
healthcheck:
test: ["CMD", "php", "artisan", "octane:status"]
depends_on:
db:
condition: service_healthy
restart: true
##################################################
# REDIS
##################################################
redis:
image: "redis:7.4"
restart: always
volumes:
- "redis-data:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
depends_on:
app:
condition: service_healthy
restart: true
##################################################
# HORIZON
##################################################
horizon:
build:
target: common
restart: always
volumes:
- horizon_data:/data
- horizon_config:/config
command: ["php", "artisan", "horizon"]
healthcheck:
test: ["CMD", "php", "artisan", "horizon:status"]
depends_on:
redis:
condition: service_healthy
restart: true
##################################################
# REVERB
##################################################
reverb:
build:
target: common
restart: always
volumes:
- reverb_data:/data
- reverb_config:/config
command: ["php", "artisan", "reverb:start", "--debug"]
# expose:
# - "8080"
healthcheck:
test: ["CMD", "pgrep", "-f", "reverb:start"]
start_period: 10s
depends_on:
horizon:
condition: service_healthy
restart: true
##################################################
# CRON
##################################################
cron:
build:
target: cron
restart: always
volumes:
- cron_data:/data
- cron_config:/config
command: ["cron", "-f"]
healthcheck:
test: ["CMD", "pgrep", "-f", "cron"]
depends_on:
reverb:
condition: service_healthy
restart: true
##################################################
# PROXY
##################################################
proxy:
build:
target: caddy-reverse-proxy
restart: always
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- proxy_data:/data
- proxy_config:/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2019/metrics"]
depends_on:
cron:
condition: service_healthy
restart: true
##################################################
# VOLUMES
##################################################
volumes:
caddy_data:
caddy_config:
##################################################
proxy_data:
proxy_config:
##################################################
horizon_data:
horizon_config:
##################################################
reverb_data:
reverb_config:
##################################################
mysql-data:
redis-data:
##################################################
cron_data:
cron_config: