-
-
Notifications
You must be signed in to change notification settings - Fork 695
Expand file tree
/
Copy pathdev.compose.yml
More file actions
121 lines (115 loc) · 3.21 KB
/
Copy pathdev.compose.yml
File metadata and controls
121 lines (115 loc) · 3.21 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# ©AngelaMos | 2026
# dev.compose.yml
#
# Development Docker Compose stack with exposed ports and
# hot reload
#
# Orchestrates 4 services on the vigil_dev bridge: postgres
# (18-alpine on host port 16969 with default devpassword),
# redis (7.4-alpine on host port 26969 with appendonly),
# backend (FastAPI dev build on host port 36969 with debug
# enabled, quiet gitpython, and SKIP_AUTO_TRAIN toggle),
# and frontend (Vite dev server on host port 46969 with
# source bind-mount for HMR and API proxy to the backend).
# Connects to infra/docker/fastapi.dev,
# infra/docker/vite.dev
services:
postgres:
image: postgres:18-alpine
container_name: vigil-postgres-dev
environment:
POSTGRES_DB: ${POSTGRES_DB:-angelusvigil}
POSTGRES_USER: ${POSTGRES_USER:-vigil}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
ports:
- "${POSTGRES_HOST_PORT:-16969}:5432"
volumes:
- postgres_dev:/var/lib/postgresql
networks:
- vigil_dev
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vigil} -d ${POSTGRES_DB:-angelusvigil}"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
redis:
image: redis:7.4-alpine
container_name: vigil-redis-dev
command: redis-server --appendonly yes
ports:
- "${REDIS_HOST_PORT:-26969}:6379"
volumes:
- redis_dev:/data
networks:
- vigil_dev
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
start_period: 3s
backend:
build:
context: .
dockerfile: infra/docker/fastapi.dev
container_name: vigil-backend-dev
environment:
ENV: development
DEBUG: "true"
LOG_LEVEL: INFO
API_KEY: ${API_KEY:-dev-test-key}
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-vigil}:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/${POSTGRES_DB:-angelusvigil}
REDIS_URL: redis://redis:6379
NGINX_LOG_PATH: /var/log/nginx/access.log
GEOIP_DB_PATH: /usr/share/GeoIP/GeoLite2-City.mmdb
GIT_PYTHON_REFRESH: quiet
MODEL_DIR: /app/data/models
SKIP_AUTO_TRAIN: ${SKIP_AUTO_TRAIN:-false}
ports:
- "${BACKEND_HOST_PORT:-36969}:8000"
volumes:
- ./backend:/app
- model_data_dev:/app/data/models
- nginx_logs_dev:/var/log/nginx
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- vigil_dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 180s
frontend:
build:
context: .
dockerfile: infra/docker/vite.dev
container_name: vigil-frontend-dev
environment:
VITE_API_TARGET: http://backend:8000
CI: "true"
ports:
- "${FRONTEND_HOST_PORT:-46969}:5173"
volumes:
- ./frontend:/app
- frontend_node_modules_dev:/app/node_modules
depends_on:
backend:
condition: service_healthy
networks:
- vigil_dev
networks:
vigil_dev:
driver: bridge
volumes:
postgres_dev:
redis_dev:
model_data_dev:
nginx_logs_dev:
name: vigil_dev_nginx_logs
frontend_node_modules_dev: