-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (103 loc) · 2.58 KB
/
docker-compose.yml
File metadata and controls
109 lines (103 loc) · 2.58 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
services:
# SQLite + local filesystem (default)
proxy:
build: .
ports:
- "8080:8080"
volumes:
- proxy-data:/data
environment:
- PROXY_LISTEN=:8080
- PROXY_BASE_URL=http://localhost:8080
- PROXY_STORAGE_PATH=/data/artifacts
- PROXY_DATABASE_PATH=/data/proxy.db
# PostgreSQL + local filesystem
proxy-postgres:
build: .
ports:
- "8081:8080"
volumes:
- proxy-artifacts:/data/artifacts
environment:
- PROXY_LISTEN=:8080
- PROXY_BASE_URL=http://localhost:8081
- PROXY_STORAGE_PATH=/data/artifacts
- PROXY_DATABASE_DRIVER=postgres
- PROXY_DATABASE_URL=postgres://proxy:proxy@postgres:5432/proxy?sslmode=disable
depends_on:
postgres:
condition: service_healthy
profiles:
- postgres
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=proxy
- POSTGRES_PASSWORD=proxy
- POSTGRES_DB=proxy
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U proxy"]
interval: 5s
timeout: 5s
retries: 5
profiles:
- postgres
# PostgreSQL + S3 (MinIO)
proxy-s3:
build: .
ports:
- "8082:8080"
environment:
- PROXY_LISTEN=:8080
- PROXY_BASE_URL=http://localhost:8082
- PROXY_STORAGE_URL=s3://proxy?endpoint=http://minio:9000&disableSSL=true&s3ForcePathStyle=true
- PROXY_DATABASE_DRIVER=postgres
- PROXY_DATABASE_URL=postgres://proxy:proxy@postgres:5432/proxy_s3?sslmode=disable
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- AWS_REGION=us-east-1
depends_on:
postgres:
condition: service_healthy
minio-init:
condition: service_completed_successfully
profiles:
- s3
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
profiles:
- s3
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set myminio http://minio:9000 minioadmin minioadmin;
mc mb --ignore-existing myminio/proxy;
exit 0;
"
profiles:
- s3
volumes:
proxy-data:
proxy-artifacts:
postgres-data:
minio-data: