-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (75 loc) · 2.44 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (75 loc) · 2.44 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
version: '3.8'
services:
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
volumes:
- minio_data:/data
createbuckets:
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/warehouse;
/usr/bin/mc anonymous set public myminio/warehouse;
exit 0;
"
pangolin-api:
build:
context: ./pangolin
dockerfile: Dockerfile
image: pangolin-api:latest
ports:
- "8080:8080"
environment:
- RUST_LOG=info
# B8: since 0.6.0 the server refuses to start without a JWT secret, and
# refuses PANGOLIN_NO_AUTH on the default 0.0.0.0 bind - so the documented
# quick start produced a crash-looping container with no explanation. The
# `:?` form fails the `docker compose up` itself with this message, which
# is a far better failure than a restart loop.
- PANGOLIN_JWT_SECRET=${PANGOLIN_JWT_SECRET:?set it first, e.g. export PANGOLIN_JWT_SECRET=$(openssl rand -base64 48)}
# B9: the server reads PANGOLIN_STORAGE_TYPE. This said
# PANGOLIN_STORE_TYPE, which nothing reads - so anyone editing it to
# `postgres` silently kept the in-memory backend and lost their data on
# every restart.
- PANGOLIN_STORAGE_TYPE=memory
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- AWS_REGION=us-east-1
- AWS_ENDPOINT_URL=http://minio:9000
depends_on:
minio:
condition: service_healthy
pangolin-ui:
build:
context: ./pangolin_ui
dockerfile: Dockerfile
image: pangolin-ui:latest
ports:
- "3000:3000"
environment:
# B31: SvelteKit's dynamic public env requires the PUBLIC_ prefix. The
# client reads PUBLIC_API_URL; this used to pass VITE_API_URL, which
# nothing read, so every deployed build fell back to the *end user's*
# localhost:8080.
- PUBLIC_API_URL=http://localhost:8080
- ORIGIN=http://localhost:3000
depends_on:
- pangolin-api
volumes:
minio_data: