-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.36 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
services:
filesharing.api:
image: filesharing.api
env_file:
- .env.prod
build:
context: .
dockerfile: FileSharing.Api/Dockerfile
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=${ENV}
- ConnectionStrings__DefaultConnection=Host=postgres;Port=5432;Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};Timeout=60;Pooling=true;MinPoolSize=10;MaxPoolSize=250;Keepalive=30
- COVER_VIDEO_PATH=/app/cover/cover.mp4
volumes:
- ./Uploads:/app/Uploads:rw
- ./assets/cover.mp4:/app/cover/cover.mp4
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
interval: 60s
timeout: 3s
retries: 3
postgres:
image: postgres:17-alpine
env_file:
- .env.prod
command: >
postgres
-c max_connections=275
-c shared_buffers=1GB
-c maintenance_work_mem=128MB
volumes:
- pgdata:/var/lib/postgresql/data:rw
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
pgdata:
uploads: