forked from baron/baron-sso
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: baron_backend
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- APP_ENV=${APP_ENV:-development}
|
|
- COOKIE_SECRET=${COOKIE_SECRET}
|
|
- DB_HOST=postgres
|
|
- CLICKHOUSE_HOST=clickhouse
|
|
- CLICKHOUSE_PORT=${CLICKHOUSE_PORT_NATIVE:-9000}
|
|
- CLICKHOUSE_USER=${CLICKHOUSE_USER:-baron}
|
|
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-password}
|
|
ports:
|
|
- "${BACKEND_PORT:-3000}:3000"
|
|
depends_on:
|
|
- infra_check
|
|
networks:
|
|
- baron_net
|
|
volumes:
|
|
- ./backend:/app
|
|
command: ["go", "run", "./cmd/server/main.go"]
|
|
|
|
frontend:
|
|
image: ghcr.io/cirruslabs/flutter:stable # Use stable version for 2026 compatibility
|
|
container_name: baron_frontend
|
|
working_dir: /app
|
|
environment:
|
|
- DESCOPE_PROJECT_ID=${DESCOPE_PROJECT_ID}
|
|
ports:
|
|
- "${FRONTEND_PORT:-5000}:5000"
|
|
volumes:
|
|
- ./frontend:/app
|
|
command:
|
|
[
|
|
"flutter",
|
|
"run",
|
|
"-d",
|
|
"web-server",
|
|
"--web-port",
|
|
"5000",
|
|
"--web-hostname",
|
|
"0.0.0.0",
|
|
]
|
|
networks:
|
|
- baron_net
|
|
|
|
# Dummy service to wait for infra network if needed,
|
|
# but essentially we assume infra is running.
|
|
# In a real unified stack, we might include infra here or use external links.
|
|
# Here we attach to the same network.
|
|
infra_check:
|
|
image: alpine
|
|
command: ["echo", "Infrastructure assumed running"]
|
|
networks:
|
|
- baron_net
|
|
|
|
networks:
|
|
baron_net:
|
|
external: true
|
|
name: baron_network
|