forked from futo-org/polycentric
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
65 lines (61 loc) · 1.62 KB
/
compose.yml
File metadata and controls
65 lines (61 loc) · 1.62 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
services:
postgres:
image: postgres:18
environment:
POSTGRES_PASSWORD: testing
volumes:
- postgres-data:/var/lib/postgresql/18/docker
ports:
- 5432:5432
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d postgres || exit 1']
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
server:
build:
context: .
dockerfile: services/server/Dockerfile
ports:
- ${POLYCENTRIC_SERVER_PORT:-3000}:3000
environment:
- RUST_LOG=debug
- DATABASE_URL=postgres://postgres:testing@postgres:5432
- CONTENT_BLOB_OS_BUCKET=polycentric-blobs
- CONTENT_BLOB_OS_ENDPOINT=http://rustfs:9000
- CONTENT_BLOB_OS_FORCE_PATH_STYLE=true
- CONTENT_BLOB_OS_ACCESS_KEY=rustfsadmin
- CONTENT_BLOB_OS_SECRET_KEY=rustfsadmin
depends_on:
postgres:
condition: service_healthy
rustfs-init:
condition: service_completed_successfully
rustfs:
image: rustfs/rustfs:latest
volumes:
- rustfs-data:/data
ports:
- 9000:9000
- 9001:9001
healthcheck:
test: ['CMD', 'curl', '-sf', 'http://localhost:9000/health']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
rustfs-init:
image: rustfs/rc:latest
depends_on:
rustfs:
condition: service_healthy
entrypoint: >
/bin/sh -c "
until rc alias set rustfs http://rustfs:9000 rustfsadmin rustfsadmin >/dev/null 2>&1; do
echo 'waiting for rustfs...'; sleep 1;
done;
rc mb -p rustfs/polycentric-blobs"
volumes:
postgres-data:
rustfs-data: