Initial InfraPulse scaffold
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: infrapulse
|
||||
POSTGRES_PASSWORD: infrapulse
|
||||
POSTGRES_DB: infrapulse
|
||||
volumes:
|
||||
- postgres-dev-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U infrapulse -d infrapulse"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
command: sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload"
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: ./worker
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./worker:/app
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
command: python -m app.main
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
environment:
|
||||
VITE_API_BASE_URL: http://localhost:8000
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- frontend-node-modules:/app/node_modules
|
||||
depends_on:
|
||||
- backend
|
||||
ports:
|
||||
- "5173:5173"
|
||||
command: npm run dev -- --host 0.0.0.0
|
||||
|
||||
volumes:
|
||||
postgres-dev-data:
|
||||
frontend-node-modules:
|
||||
Reference in New Issue
Block a user