-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (61 loc) · 1.66 KB
/
Copy pathdocker-compose.yml
File metadata and controls
66 lines (61 loc) · 1.66 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
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: localhistory
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d localhistory"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
backend:
build:
context: ./backend
ports:
- "8000:8000"
env_file:
- path: ./backend/.env
required: false
depends_on:
db:
condition: service_healthy
minio:
condition: service_started
minio:
image: minio/minio
restart: unless-stopped
ports:
- "9000:9000" # S3 API
- "9001:9001" # Web UI (http://localhost:9001, login: minioadmin/minioadmin)
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
minio-init:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c " sleep 5; mc alias set localhistory http://minio:9000 minioadmin minioadmin; mc mb localhistory/images || true; mc mb localhistory/audio || true; mc mb localhistory/videos || true; mc anonymous set public localhistory/images; mc anonymous set public localhistory/audio; mc anonymous set public localhistory/videos; exit 0; "
frontend:
build:
context: ./frontend
ports:
- "3000:80"
environment:
API_BASE_URL: http://localhost:8000
depends_on:
- backend
volumes:
postgres_data:
minio_data: