-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (43 loc) · 1.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (43 loc) · 1.1 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
# docker compose up --build
# db-reset
# docker compose exec -T postgres psql -U fluxbb -d fluxbb -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
#
services:
postgres:
image: postgres:17-alpine
container_name: fluxbb-postgres
restart: unless-stopped
environment:
POSTGRES_USER: fluxbb
POSTGRES_PASSWORD: fluxbb
POSTGRES_DB: fluxbb
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fluxbb -d fluxbb"]
interval: 25s
timeout: 5s
retries: 10
app:
build:
context: .
dockerfile: Dockerfile
container_name: fluxbb-app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://fluxbb:fluxbb@postgres:5432/fluxbb
RUST_LOG: "sqlx=warn,info"
IP: "0.0.0.0"
PORT: "8080"
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/api/health"]
interval: 30s
timeout: 5s
retries: 5
volumes:
postgres_data: