-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (74 loc) · 2.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
79 lines (74 loc) · 2.31 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
version: "3.8"
services:
nats:
image: nats:latest
ports:
- "4222:4222"
- "8222:8222"
command: ["--http_port", "8222"]
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8222/healthz"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
zerochaind:
build:
context: .
dockerfile: Dockerfile
ports:
- "${ZEROCHAIN_LISTEN:-8080}:8080"
environment:
ZEROCHAIN_WORKSPACE: /workspace
ZEROCHAIN_LISTEN: 0.0.0.0:8080
ZEROCHAIN_CAS_DIR: /workspace/.zerochain/cas
ZEROCHAIN_BROKER_ENABLED: "true"
ZEROCHAIN_BROKER_BACKEND: "nats"
ZEROCHAIN_BROKER_URL: "nats://nats:4222"
ZEROCHAIN_API_KEY: ${ZEROCHAIN_API_KEY:-}
ZEROCHAIN_COW_BACKEND: ${ZEROCHAIN_COW_BACKEND:-auto}
ZEROCHAIN_CAS_S3_BUCKET: ${ZEROCHAIN_CAS_S3_BUCKET:-zerochain}
ZEROCHAIN_CAS_S3_REGION: ${ZEROCHAIN_CAS_S3_REGION:-us-east-1}
ZEROCHAIN_CAS_S3_ENDPOINT: http://minio:9000
ZEROCHAIN_CAS_S3_ACCESS_KEY: ${ZEROCHAIN_CAS_S3_ACCESS_KEY:-minioadmin}
ZEROCHAIN_CAS_S3_SECRET_KEY: ${ZEROCHAIN_CAS_S3_SECRET_KEY:-minioadmin}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
RUST_LOG: ${RUST_LOG:-zerochaind=info}
volumes:
- zerochain-workspace:/workspace
depends_on:
nats:
condition: service_healthy
minio:
condition: service_healthy
minio:
image: minio/minio:latest
command: ["server", "/data", "--console-address", ":9001"]
ports:
- "${MINIO_S3_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
environment:
MINIO_ROOT_USER: ${ZEROCHAIN_CAS_S3_ACCESS_KEY:-minioadmin}
MINIO_ROOT_PASSWORD: ${ZEROCHAIN_CAS_S3_SECRET_KEY:-minioadmin}
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 ${ZEROCHAIN_CAS_S3_ACCESS_KEY:-minioadmin} ${ZEROCHAIN_CAS_S3_SECRET_KEY:-minioadmin};
mc mb --ignore-existing local/zerochain;
"
restart: "no"
volumes:
zerochain-workspace:
minio-data: