Feat: Backend scaffolding and local dev stack
This commit is contained in:
@@ -1,15 +1,95 @@
|
||||
x-backend-service: &backend-service
|
||||
image: moku/work-backend:dev
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ../Env/.env.local
|
||||
environment:
|
||||
DATABASE_URL: postgres://moku:moku_dev_password@postgres:5432/moku?sslmode=disable
|
||||
VALKEY_URL: redis://valkey:6379/0
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
valkey:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ../Backend:/app
|
||||
- moku_work_backend_go_pkg:/go/pkg/mod
|
||||
- moku_work_backend_go_build:/root/.cache/go-build
|
||||
|
||||
services:
|
||||
frontend:
|
||||
image: moku/work-frontend:dev
|
||||
container_name: moku-work-frontend
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ../Env/.env.local
|
||||
ports:
|
||||
- "3333:3333"
|
||||
volumes:
|
||||
- ../Frontend:/app
|
||||
- moku_work_frontend_node_modules:/app/node_modules
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
container_name: moku-work-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: moku
|
||||
POSTGRES_USER: moku
|
||||
POSTGRES_PASSWORD: moku_dev_password
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- moku_work_postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U moku -d moku"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
container_name: moku-work-valkey
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- moku_work_valkey_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "valkey-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
|
||||
frontend:
|
||||
image: moku/work-frontend:dev
|
||||
container_name: moku-work-frontend
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ../Env/.env.local
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
valkey:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "3333:3333"
|
||||
volumes:
|
||||
- ../Frontend:/app
|
||||
- moku_work_frontend_node_modules:/app/node_modules
|
||||
|
||||
web:
|
||||
<<: *backend-service
|
||||
container_name: moku-work-backend-web
|
||||
command: ["air", "-c", ".air.web.toml"]
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
api:
|
||||
<<: *backend-service
|
||||
container_name: moku-work-backend-api
|
||||
command: ["air", "-c", ".air.api.toml"]
|
||||
ports:
|
||||
- "8081:8081"
|
||||
|
||||
worker:
|
||||
<<: *backend-service
|
||||
container_name: moku-work-backend-worker
|
||||
command: ["air", "-c", ".air.worker.toml"]
|
||||
|
||||
volumes:
|
||||
moku_work_frontend_node_modules:
|
||||
moku_work_postgres_data:
|
||||
moku_work_valkey_data:
|
||||
moku_work_frontend_node_modules:
|
||||
moku_work_backend_go_pkg:
|
||||
moku_work_backend_go_build:
|
||||
|
||||
Reference in New Issue
Block a user