-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (75 loc) · 1.98 KB
/
docker-compose.yml
File metadata and controls
79 lines (75 loc) · 1.98 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
# Docker Compose for 10 Minute Pokemon
# Includes app, PostgreSQL, and MinIO - everything needed to run
# All configuration is in .env file
services:
app:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: tenmp-app
restart: unless-stopped
ports:
- "80:3001"
environment:
NODE_ENV: production
PORT: 3001
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_SSL: ${DB_SSL}
MINIO_ENDPOINT: ${MINIO_ENDPOINT}
MINIO_PORT: ${MINIO_PORT}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_BUCKET: ${MINIO_BUCKET}
MINIO_USE_SSL: ${MINIO_USE_SSL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
postgres:
image: postgres:15-alpine
container_name: tenmp-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_NAME}"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: tenmp-minio
restart: unless-stopped
command: server /data --console-address ":9001"
ports:
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:
minio_data: