-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (85 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (85 loc) · 2.34 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
services:
app:
build: .
container_name: stylemind_api
restart: unless-stopped
env_file:
- .env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-db_stylemind}:5432/${POSTGRES_DB:-stylemind}?schema=public}
REDIS_HOST: redis_stylemind
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
MINIO_ENDPOINT: ${MINIO_ENDPOINT:-10.8.3.100}
OBJECT_STORAGE: ${OBJECT_STORAGE:-MINIO}
ports:
- 3000:3000
depends_on:
db:
condition: service_healthy
restart: true
redis:
condition: service_started
minio:
condition: service_healthy
networks:
- stylemind_network
command: yarn run start:migrate:prod
db:
container_name: 'db_stylemind'
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-stylemind}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-stylemind}"]
interval: 30s
retries: 5
start_period: 30s
timeout: 10s
networks:
- stylemind_network
redis:
container_name: redis_stylemind
image: redis:latest
restart: unless-stopped
volumes:
- redis-data:/data
networks:
- stylemind_network
minio:
container_name: minio_stylemind
image: minio/minio:latest
restart: unless-stopped
ports:
- 9000:9000 # MinIO API
- 9001:9001 # MinIO UI
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
MINIO_COMPRESSION_ENABLED: "on"
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 60s
retries: 5
start_period: 30s
timeout: 10s
networks:
stylemind_network:
ipv4_address: 10.8.3.100
volumes:
postgres-data:
redis-data:
minio-data:
networks:
stylemind_network:
ipam:
config:
- subnet: 10.8.3.0/24