-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 1006 Bytes
/
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
version: '3.7'
services:
postgres:
image: "postgres:13.1"
hostname: postgres
container_name: postmates-postgres
env_file: .env
environment:
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
ports:
- "5432:5432"
redis:
image: redis:5.0.10-alpine
container_name: postmates-redis
ports:
- "6379:6379"
postmates:
build:
dockerfile: ./Dockerfile
context: .
args:
PORT: ${PORT}
container_name: postmates-app
ports:
- "9000:${PORT}"
env_file: .env
depends_on:
- postgres
- redis
- waiter
waiter:
build:
dockerfile: ./Dockerfile.wait
context: .
container_name: postmates-waiter
depends_on:
- postgres
- redis
environment:
- WAIT_HOSTS=postgres:5432, redis:6379
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
- WAIT_AFTER_HOSTS=0