-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.96 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
# FinWatch local development stack.
#
# Start everything with: make dev (or: docker compose up --build)
# All credentials below are SAFE example development values only.
#
# Compose reads variables from a local `.env` (see `.env.example`).
name: finwatch
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-finwatch}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-finwatch_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-finwatch}
ports:
- "5432:5432"
volumes:
- finwatch_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-finwatch} -d ${POSTGRES_DB:-finwatch}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
api:
build:
context: ./apps/api
environment:
APP_ENV: ${APP_ENV:-development}
LOG_LEVEL: ${LOG_LEVEL:-info}
HTTP_HOST: 0.0.0.0
HTTP_PORT: "8080"
DATABASE_URL: postgres://${POSTGRES_USER:-finwatch}:${POSTGRES_PASSWORD:-finwatch_dev_password}@db:5432/${POSTGRES_DB:-finwatch}?sslmode=disable
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-http://localhost:8081,http://localhost:5173}
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "/app/api", "healthcheck"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
web:
build:
context: ./apps/web
args:
# Vite bakes these at build time; defaults target the local stack.
VITE_API_URL: ${VITE_API_URL:-http://localhost:8080}
VITE_WS_URL: ${VITE_WS_URL:-ws://localhost:8080/ws}
ports:
- "8081:8080"
depends_on:
api:
condition: service_started
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
volumes:
finwatch_pgdata:
name: finwatch_pgdata