-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (74 loc) · 1.72 KB
/
docker-compose.yml
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.9"
services:
web:
container_name: web
build: ./web
ports:
- "8000:8000"
volumes:
- .:/web
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- ACCESS_KEY=minioadmin
- SECRET_KEY=minioadmin
- S3_ENDPOINT_URL=minio:9000
command: uvicorn web.app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
depends_on:
db:
condition: service_healthy
links:
- db
- minio
db:
container_name: postgresql
image: postgres:15.3-alpine
ports:
- "5433:5432"
volumes:
- db_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 30s
timeout: 10s
retries: 3
minio:
container_name: minio
hostname: minio
image: 'bitnami/minio:latest'
ports:
- '9000:9000'
- '9001:9001'
volumes:
- minio-data:/data
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- MINIO_API_PORT_NUMBER=9000
- MINIO_CONSOLE_PORT_NUMBER=9001
restart: always
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 10s
retries: 3
nginx:
container_name: nginx
image: nginx:1.23.0-alpine
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- minio
volumes:
db_data:
minio-data: