-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (90 loc) · 2.2 KB
/
docker-compose.yml
File metadata and controls
99 lines (90 loc) · 2.2 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
services:
postgres:
image: postgres:15
container_name: codecomp-postgres
environment:
POSTGRES_DB: codecomp
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:latest
container_name: codecomp-redis
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:3-management
container_name: codecomp-rabbitmq
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_running"]
interval: 5s
timeout: 5s
retries: 5
judge0:
image: judge0/judge0:latest
container_name: codecomp-judge0
ports:
- "2358:2358"
environment:
POSTGRES_HOST: postgres
POSTGRES_DB: codecomp
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
REDIS_HOST: redis
depends_on:
- postgres
- redis
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
judge0-worker:
image: judge0/judge0:latest
container_name: codecomp-judge0-worker
command: bash -c "QUEUE=* bundle exec rake resque:work"
depends_on:
- judge0
- redis
- postgres
environment:
REDIS_HOST: redis
POSTGRES_HOST: postgres
POSTGRES_DB: codecomp
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
backend:
build: .
container_name: codecomp-backend
env_file:
- .env
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_started
redis:
condition: service_started
judge0:
condition: service_started
ports:
- "8081:8081"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/codecomp
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: 6379
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_USERNAME: guest
SPRING_RABBITMQ_PASSWORD: guest
volumes:
postgres_data: