-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
64 lines (61 loc) · 2.29 KB
/
docker-compose.yaml
File metadata and controls
64 lines (61 loc) · 2.29 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
services:
postgres:
image: postgres:17 # Using a specific version is generally recommended
container_name: sproto_postgres
environment:
POSTGRES_USER: postgres # Default user
POSTGRES_PASSWORD: postgres # Default password - CHANGE FOR PRODUCTION
POSTGRES_DB: sproto # Database name used in default DSN
volumes:
- postgres_data:/var/lib/postgresql/data # Persist data
- ./sql:/docker-entrypoint-initdb.d # Mount SQL scripts for initialization
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d sproto"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: sproto_minio
environment:
MINIO_ROOT_USER: minioadmin # Default access key - CHANGE FOR PRODUCTION
MINIO_ROOT_PASSWORD: minioadmin # Default secret key - CHANGE FOR PRODUCTION
volumes:
- minio_data:/data # Persist data
command: server /data --console-address ":9090"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
registry-server:
build:
context: .
dockerfile: Dockerfile # We'll create this next
container_name: sproto_registry_server
ports:
- "8080:8080" # Map host port 8080 to container port 8080 (default)
environment:
# These should match the defaults in config.go or be overridden
PROTOREG_SERVER_PORT: 8080
PROTOREG_DB_DSN: "host=postgres user=postgres password=postgres dbname=sproto port=5432 sslmode=disable" # Use service name 'postgres'
PROTOREG_MINIO_ENDPOINT: "minio:9000" # Internal endpoint remains the same
PROTOREG_MINIO_ACCESS_KEY: minioadmin
PROTOREG_MINIO_SECRET_KEY: minioadmin
PROTOREG_MINIO_BUCKET: sproto-artifacts
PROTOREG_MINIO_USE_SSL: "false"
PROTOREG_AUTH_TOKEN: "supersecrettoken" # CHANGE FOR PRODUCTION
depends_on:
postgres:
condition: service_healthy # Wait for postgres to be ready
minio:
condition: service_healthy # Wait for minio to be ready
restart: unless-stopped
# Add volumes for live code reloading during development if needed
# volumes:
# - .:/app
volumes:
postgres_data:
minio_data: