-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (114 loc) · 3.02 KB
/
docker-compose.yml
File metadata and controls
120 lines (114 loc) · 3.02 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
118
119
120
services:
flutter-web:
image: ghcr.io/szentjozsefhackathon/ignacio-flutter-web:latest
restart: always
mem_limit: 128m
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=/api
- PUBLIC_URL=/
restart: always
mem_limit: 64m
backend:
build:
context: ./backend
restart: always
mem_limit: 256m
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:5005/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
environment:
- NODE_ENV=production
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=${POSTGRES_DB}
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379
- MINIO_ENDPOINT=minio:9000
- MINIO_PUBLIC_URL=http://localhost:9000
- MINIO_ACCESS_KEY=${MINIO_ROOT_USER}
- MINIO_SECRET_KEY=${MINIO_ROOT_PASSWORD}
- MINIO_BUCKET=ignacio-media
postgres:
image: postgres:15-alpine
restart: always
mem_limit: 256m
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./backend/src/data/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7-alpine
restart: always
mem_limit: 256m
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 5s
timeout: 5s
retries: 5
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
ports:
- "6379:6379"
minio:
image: minio/minio
restart: always
mem_limit: 256m
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- ./backend/src/data/minio:/data
ports:
- "9000:9000"
- "9001:9001"
nginx:
image: nginx:alpine
restart: always
mem_limit: 512m
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost/"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "80:80"
depends_on:
frontend:
condition: service_started
backend:
condition: service_healthy
flutter-web:
condition: service_started