-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
167 lines (161 loc) · 4.59 KB
/
docker-compose.dev.yml
File metadata and controls
167 lines (161 loc) · 4.59 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: pricore-app
restart: unless-stopped
ports:
- "${APP_PORT:-8000}:8000"
volumes:
- ./storage:/app/storage
- ./database:/app/database
environment:
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- APP_KEY=${APP_KEY:-}
- APP_URL=${APP_URL:-http://localhost:8000}
- DB_CONNECTION=${DB_CONNECTION:-sqlite}
- DB_DATABASE=${DB_DATABASE:-/app/database/database.sqlite}
- REDIS_HOST=redis
- REDIS_PORT=6379
- CACHE_STORE=redis
- SESSION_DRIVER=redis
- QUEUE_CONNECTION=redis
- BROADCAST_CONNECTION=${BROADCAST_CONNECTION:-reverb}
- REVERB_APP_ID=${REVERB_APP_ID:-pricore-local}
- REVERB_APP_KEY=${REVERB_APP_KEY:-pricore-key}
- REVERB_APP_SECRET=${REVERB_APP_SECRET:-pricore-secret}
- REVERB_HOST=reverb
- REVERB_PORT=8080
- REVERB_SCHEME=http
networks:
- pricore-network
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 90s
horizon:
build:
context: .
dockerfile: Dockerfile
container_name: pricore-horizon
restart: unless-stopped
command: php artisan horizon
stop_signal: SIGTERM
stop_grace_period: 30s
volumes:
- ./storage:/app/storage
- ./database:/app/database
environment:
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- APP_KEY=${APP_KEY:-}
- DB_CONNECTION=${DB_CONNECTION:-sqlite}
- DB_DATABASE=${DB_DATABASE:-/app/database/database.sqlite}
- REDIS_HOST=redis
- REDIS_PORT=6379
- CACHE_STORE=redis
- QUEUE_CONNECTION=redis
- BROADCAST_CONNECTION=${BROADCAST_CONNECTION:-reverb}
- REVERB_APP_ID=${REVERB_APP_ID:-pricore-local}
- REVERB_APP_KEY=${REVERB_APP_KEY:-pricore-key}
- REVERB_APP_SECRET=${REVERB_APP_SECRET:-pricore-secret}
- REVERB_HOST=reverb
- REVERB_PORT=8080
- REVERB_SCHEME=http
networks:
- pricore-network
depends_on:
app:
condition: service_healthy
healthcheck:
test: ["CMD", "php", "artisan", "horizon:status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
scheduler:
build:
context: .
dockerfile: Dockerfile
container_name: pricore-scheduler
restart: unless-stopped
command: sh -c "while true; do php artisan schedule:run --verbose --no-interaction; sleep 60; done"
volumes:
- ./storage:/app/storage
- ./database:/app/database
environment:
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- APP_KEY=${APP_KEY:-}
- DB_CONNECTION=${DB_CONNECTION:-sqlite}
- DB_DATABASE=${DB_DATABASE:-/app/database/database.sqlite}
- REDIS_HOST=redis
- REDIS_PORT=6379
- CACHE_STORE=redis
- QUEUE_CONNECTION=redis
networks:
- pricore-network
depends_on:
app:
condition: service_healthy
reverb:
build:
context: .
dockerfile: Dockerfile
container_name: pricore-reverb
restart: unless-stopped
command: php artisan reverb:start --host=0.0.0.0 --port=8080
ports:
- "${REVERB_PORT:-8080}:8080"
volumes:
- ./storage:/app/storage
- ./database:/app/database
environment:
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- APP_KEY=${APP_KEY:-}
- DB_CONNECTION=${DB_CONNECTION:-sqlite}
- DB_DATABASE=${DB_DATABASE:-/app/database/database.sqlite}
- REDIS_HOST=redis
- REDIS_PORT=6379
- CACHE_STORE=redis
- REVERB_APP_ID=${REVERB_APP_ID:-pricore-local}
- REVERB_APP_KEY=${REVERB_APP_KEY:-pricore-key}
- REVERB_APP_SECRET=${REVERB_APP_SECRET:-pricore-secret}
- REVERB_HOST=0.0.0.0
- REVERB_PORT=8080
- REVERB_SCHEME=http
networks:
- pricore-network
depends_on:
app:
condition: service_healthy
redis:
image: redis:7-alpine
container_name: pricore-redis
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 128mb --maxmemory-policy allkeys-lru
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- pricore-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
networks:
pricore-network:
driver: bridge
volumes:
redis-data: