-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
75 lines (70 loc) · 1.76 KB
/
docker-compose.prod.yml
File metadata and controls
75 lines (70 loc) · 1.76 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
services:
db:
image: postgres:16-alpine
container_name: roomflow-postgres-prod
env_file: ./.env
volumes:
- roomflow-pg-data-prod:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: roomflow-minio-prod
env_file: ./.env
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
volumes:
- roomflow-minio-data-prod:/data
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:9000/minio/health/live || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
mc:
image: minio/mc:latest
container_name: roomflow-minio-mc-prod
env_file: ./.env
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} &&
mc mb -p local/${S3_BUCKET} || true &&
mc anonymous set none local/${S3_BUCKET} || true
"
app:
image: roomflow-app:latest
container_name: roomflow-app-prod
build:
context: .
dockerfile: Dockerfile
env_file: ./.env
environment:
- SPRING_PROFILES_ACTIVE=docker
restart: unless-stopped
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
nginx:
container_name: roomflow-nginx-prod
build:
context: .
dockerfile: Dockerfile_nginx
ports:
- "8080:80"
restart: unless-stopped
depends_on:
- app
volumes:
roomflow-pg-data-prod:
roomflow-minio-data-prod: