-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
117 lines (111 loc) · 2.97 KB
/
docker-compose.dev.yml
File metadata and controls
117 lines (111 loc) · 2.97 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
110
111
112
113
114
115
116
117
version: '3.8'
services:
storage:
build:
context: .
dockerfile: Dockerfile
container_name: storage-service-dev
restart: unless-stopped
ports:
- "5004:5004"
environment:
- SERVER_PORT=5004
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=minisource
- POSTGRES_PASSWORD=minisource
- POSTGRES_DB=storage
- POSTGRES_LOG_LEVEL=info
- STORAGE_DEFAULT_PROVIDER=s3
- STORAGE_S3_ENDPOINT=minio:9000
- STORAGE_S3_REGION=us-east-1
- STORAGE_S3_BUCKET=storage
- STORAGE_S3_ACCESS_KEY=minioadmin
- STORAGE_S3_SECRET_KEY=minioadmin
- STORAGE_S3_USE_SSL=false
- STORAGE_S3_PATH_STYLE=true
- STORAGE_LOCAL_PATH=/app/uploads
- IMAGE_MAX_WIDTH=4096
- IMAGE_MAX_HEIGHT=4096
- IMAGE_DEFAULT_QUALITY=85
- IMAGE_ENABLE_WEBP=true
- IMAGE_ENABLE_AVIF=true
- UPLOAD_MAX_FILE_SIZE=104857600
- UPLOAD_CHUNK_SIZE=5242880
- AUTH_SERVICE_URL=http://auth:5001
- AUTH_SERVICE_NAME=storage-service
- AUTH_SERVICE_SECRET=storage-service-secret
- TRACING_ENABLED=true
- TRACING_SERVICE_NAME=storage-service
- TRACING_OTEL_ENDPOINT=http://jaeger:4318
- LOG_LEVEL=debug
volumes:
- ./uploads:/app/uploads
- ./logs:/app/logs
networks:
- minisource-network
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
postgres:
image: postgres:16-alpine
container_name: storage-postgres-dev
restart: unless-stopped
ports:
- "5434:5432"
environment:
- POSTGRES_USER=minisource
- POSTGRES_PASSWORD=minisource
- POSTGRES_DB=storage
volumes:
- postgres-dev-data:/var/lib/postgresql/data
networks:
- minisource-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U minisource -d storage"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: storage-minio-dev
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-dev-data:/data
networks:
- minisource-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 3
minio-setup:
image: minio/mc:latest
container_name: storage-minio-setup-dev
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set myminio http://minio:9000 minioadmin minioadmin;
mc mb myminio/storage --ignore-existing;
mc anonymous set download myminio/storage/public;
exit 0;
"
networks:
- minisource-network
networks:
minisource-network:
driver: bridge
volumes:
postgres-dev-data:
minio-dev-data: