forked from cranemont/Iris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (71 loc) · 2.36 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3"
services:
app:
container_name: iris
build:
dockerfile: Dockerfile
depends_on:
- rabbitmq
- setup
restart: always
stdin_open: true
tty: true
environment:
TESTCASE_SERVER_URL: http://testcase-server:30000/problem/:id/testcase
TESTCASE_SERVER_URL_PLACEHOLDER: :id
TESTCASE_SERVER_AUTH_HEADER: Authorization
TESTCASE_SERVER_AUTH_TOKEN: iris-token
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
RABBITMQ_HOST: ${RABBITMQ_HOST}
RABBITMQ_PORT: ${RABBITMQ_PORT}
RABBITMQ_CONSUMER_CONNECTION_NAME: ${RABBITMQ_CONSUMER_CONNECTION_NAME}
RABBITMQ_CONSUMER_QUEUE_NAME: ${JUDGE_SUBMISSION_QUEUE_NAME}
RABBITMQ_CONSUMER_TAG: ${RABBITMQ_CONSUMER_TAG}
RABBITMQ_PRODUCER_CONNECTION_NAME: ${RABBITMQ_PRODUCER_CONNECTION_NAME}
RABBITMQ_PRODUCER_EXCHANGE_NAME: ${JUDGE_EXCHANGE_NAME}
RABBITMQ_PRODUCER_ROUTING_KEY: ${JUDGE_RESULT_ROUTING_KEY}
testcase-server:
container_name: testcase-server
build:
context: ./tests/testcase-server
dockerfile: Dockerfile
stdin_open: true
tty: true
ports:
- 20000:30000
volumes:
- ./tests/testcase-server/data:/app/data
redis:
container_name: ${REDIS_HOST}
image: redis:alpine
setup:
image: python:3.8-alpine
depends_on:
- rabbitmq
volumes:
- ./scripts/rabbitmq-setup.sh:/setup.sh
environment:
RABBITMQ_HOST: ${RABBITMQ_HOST}
RABBITMQ_PORT: ${RABBITMQ_PORT}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
JUDGE_EXCHANGE_NAME: ${JUDGE_EXCHANGE_NAME}
JUDGE_SUBMISSION_QUEUE_NAME: ${JUDGE_SUBMISSION_QUEUE_NAME}
JUDGE_SUBMISSION_ROUTING_KEY: ${JUDGE_SUBMISSION_ROUTING_KEY}
JUDGE_RESULT_QUEUE_NAME: ${JUDGE_RESULT_QUEUE_NAME}
JUDGE_RESULT_ROUTING_KEY: ${JUDGE_RESULT_ROUTING_KEY}
entrypoint:
- /setup.sh
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: ${RABBITMQ_HOST}
ports:
- ${RABBITMQ_PORT}:5672
- ${RABBITMQ_ADMIN_PORT}:15672
environment:
RABBITMQ_ERLANG_COOKIE: RabbitMQ-My-Cookies
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}