forked from hngprojects/hng_boilerplate_php_laravel_web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1 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
services:
app:
image: myapp:latest
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
- APP_ENV=dev
- APP_DEBUG=true
- DB_CONNECTION=pgsql
- DB_HOST=db
- DB_PORT=5432
- DB_DATABASE=app_dev
- DB_USERNAME=app_dev
- DB_PASSWORD=changethis123
- QUEUE_CONNECTION=redis
- REDIS_HOST=redis
- REDIS_PORT=6379
db:
image: postgres:latest
environment:
POSTGRES_USER: app_dev
POSTGRES_PASSWORD: changethis123
POSTGRES_DB: app_dev
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app_dev"]
interval: 10s
retries: 5
start_period: 30s
timeout: 5s
redis:
image: redis:latest
ports:
- "6300:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
retries: 3
start_period: 30s
timeout: 5s
volumes:
db_data: