Repository navigation
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
141 lines (140 loc) · 3.81 KB
/
Copy pathdocker-compose-dev.yml
File metadata and controls
141 lines (140 loc) · 3.81 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
x-common-envs: &common-envs
FILETRACKER_URL: 'http://s3dedup:9999/ft'
DATABASE_HOST: 'db'
DATABASE_PORT: '5432'
OIOIOI_TIMEZONE: '${OIOIOI_TIMEZONE:-Europe/Warsaw}'
services:
db:
image: library/postgres:14.17
environment:
POSTGRES_USER: "oioioi"
POSTGRES_PASSWORD: "password"
POSTGRES_DB: "oioioi"
volumes:
- postgress-data-dev:/var/lib/postgresql/data
stop_grace_period: 1m
web:
image: sio2project/oioioi-dev
command: ["/sio2/oioioi/oioioi_init.sh", "--dev"]
build:
context: .
dockerfile: Dockerfile
target: development
args:
- "oioioi_uid=${OIOIOI_UID}"
extra_hosts:
- "web:127.0.0.1"
environment:
OIOIOI_DB_ENGINE: 'django.db.backends.postgresql'
RABBITMQ_HOST: 'broker'
RABBITMQ_PORT: '5672'
RABBITMQ_USER: 'oioioi'
RABBITMQ_PASSWORD: 'oioioi'
FILETRACKER_SERVER_ENABLED: 'False'
<<: *common-envs
ports:
# web server
- "8000:8000"
# notifications server
# - "7887:7887"
volumes:
- .:/sio2/oioioi
# use docker's node_modules and dist_webpack instead of the host ones
- node_modules-dev:/sio2/oioioi/node_modules
- dist_webpack-dev:/sio2/oioioi/dist_webpack
- filetracker-data-dev:/sio2/deployment/media
# - ./deployment:/sio2/deployment
stop_grace_period: 3m
# Healthy once oioioi_init.sh has built assets and applied migrations.
healthcheck:
test: ["CMD", "test", "-f", "/tmp/oioioi_init_done"]
interval: 5s
timeout: 3s
retries: 3
start_period: 15m
depends_on:
- db
- broker
- s3dedup
worker:
image: sio2project/oioioi-dev
command: ["/sio2/oioioi/worker_init.sh"]
environment:
WEB_URL: "web:8000"
<<: *common-envs
volumes:
- .:/sio2/oioioi
stop_grace_period: 1m
cap_add:
- ALL
depends_on:
- db
broker:
image: library/rabbitmq:3.8
environment:
RABBITMQ_DEFAULT_USER: oioioi
RABBITMQ_DEFAULT_PASS: oioioi
stop_grace_period: 1m
rustfs:
image: rustfs/rustfs:1.0.1
environment:
RUSTFS_VOLUMES: /data
RUSTFS_ADDRESS: 0.0.0.0:9000
RUSTFS_CONSOLE_ADDRESS: 0.0.0.0:9001
RUSTFS_CONSOLE_ENABLE: "true"
RUSTFS_ACCESS_KEY: rustfsadmin
RUSTFS_SECRET_KEY: rustfsadmin
volumes:
- rustfs-data-dev:/data
ports:
- "9000:9000" # RustFS S3 API
- "9001:9001" # RustFS Console
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
stop_grace_period: 1m
s3dedup:
image: ghcr.io/sio2project/s3dedup:latest-dev
ports:
- "9999:9999"
environment:
LOG_LEVEL: debug
BUCKET_NAME: oioioi-filetracker
LISTEN_ADDRESS: 0.0.0.0
LISTEN_PORT: 9999
KVSTORAGE_TYPE: sqlite
SQLITE_PATH: /app/data/kv.db
SQLITE_MAX_CONNECTIONS: 10
S3_ENDPOINT: http://rustfs:9000
S3_ACCESS_KEY: rustfsadmin
S3_SECRET_KEY: rustfsadmin
S3_FORCE_PATH_STYLE: "true"
CLEANER_ENABLED: "true"
CLEANER_INTERVAL: 3600
CLEANER_BATCH_SIZE: 1000
CLEANER_MAX_DELETES: 10000
volumes:
- s3dedup-data-dev:/app/data
depends_on:
rustfs:
condition: service_healthy
# The image's built-in healthcheck probes port 8080, but we set LISTEN_PORT=9999,
# so it has to be overridden to check the port the server actually listens on.
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9999/health || exit 1"]
interval: 30s
timeout: 3s
start_period: 5s
retries: 3
restart: on-failure:5
stop_grace_period: 1m
volumes:
postgress-data-dev:
filetracker-data-dev:
node_modules-dev:
dist_webpack-dev:
rustfs-data-dev:
s3dedup-data-dev: