-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.prod.yml
48 lines (48 loc) · 1.13 KB
/
docker-compose.prod.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
services:
laravel:
build:
context: .
dockerfile: docker/app/Dockerfile
env_file:
- .env.prod
ports:
- 80:80
depends_on:
- pgsql
- redis
pgsql:
image: 'postgres:15'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'pgsql:/var/lib/postgresql/data'
healthcheck:
test:
- CMD
- pg_isready
- '-q'
- '-d'
- '${DB_DATABASE}'
- '-U'
- '${DB_USERNAME}'
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
volumes:
- 'redis:/data'
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
volumes:
pgsql:
driver: local
redis:
driver: local