-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
61 lines (59 loc) · 1.34 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
52
53
54
55
56
57
58
59
60
61
services:
worker:
build:
context: .
dockerfile: ./apps/worker/Dockerfile
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
networks:
- code-compiler-network
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
api:
env_file: .env
build:
context: .
dockerfile: ./apps/api/Dockerfile
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
networks:
- code-compiler-network
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
db:
image: postgres
networks:
- code-compiler-network
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis
networks:
- code-compiler-network
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 5s
timeout: 5s
retries: 5
networks:
code-compiler-network:
driver: bridge