Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (75 loc) · 1.79 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (75 loc) · 1.79 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
version: '3.8'
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: piclo
POSTGRES_PASSWORD: piclo
POSTGRES_DB: piclo
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U piclo -d piclo"]
interval: 5s
timeout: 5s
retries: 5
migrate:
image: migrate/migrate
volumes:
- ./migrations:/migrations
command: ["-path", "/migrations/", "-database", "postgres://piclo:piclo@db:5432/piclo?sslmode=disable", "up"]
depends_on:
db:
condition: service_healthy
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "9090:9090"
environment:
PORT: 9090
DATABASE_URL: postgres://piclo:piclo@db:5432/piclo?sslmode=disable
PUBLIC_URL: http://127.0.0.1:5173
MINIO_ENDPOINT: minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: piclo-images
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
minio:
condition: service_healthy
restart: unless-stopped
frontend:
build:
context: .
dockerfile: front/Dockerfile
ports:
- "5173:80"
depends_on:
- backend
restart: unless-stopped
volumes:
pgdata:
minio_data: