services: backend: build: context: ./backend dockerfile: Dockerfile container_name: baron_backend env_file: - .env environment: - APP_ENV=${APP_ENV:-development} - GO_ENV=${APP_ENV:-development} - COOKIE_SECRET=${COOKIE_SECRET} - JWT_SECRET=${JWT_SECRET} - NAVER_CLOUD_ACCESS_KEY=${NAVER_CLOUD_ACCESS_KEY} - NAVER_CLOUD_SECRET_KEY=${NAVER_CLOUD_SECRET_KEY} - NAVER_CLOUD_SERVICE_ID=${NAVER_CLOUD_SERVICE_ID} - NAVER_SENDER_PHONE_NUMBER=${NAVER_SENDER_PHONE_NUMBER} - USERFRONT_URL=${USERFRONT_URL} - REDIS_ADDR=${REDIS_ADDR} - IDP_PROVIDER=${IDP_PROVIDER:-ory} - KRATOS_ADMIN_URL=${KRATOS_ADMIN_URL:-http://kratos:4434} - HYDRA_ADMIN_URL=${HYDRA_ADMIN_URL:-http://hydra:4445} - HYDRA_PUBLIC_URL=${HYDRA_PUBLIC_URL:-http://hydra:4444} - KETO_READ_URL=${KETO_READ_URL:-http://keto:4466} - KETO_WRITE_URL=${KETO_WRITE_URL:-http://keto:4467} - DB_HOST=postgres - CLICKHOUSE_HOST=clickhouse - CLICKHOUSE_PORT=${CLICKHOUSE_PORT_NATIVE:-9000} - CLICKHOUSE_USER=${CLICKHOUSE_USER:-baron} - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-password} - SEED_TENANT_CSV_PATH=/app/seed-tenant.csv depends_on: - infra_check networks: - baron_net - ory-net volumes: - ./backend:/app - ./config:/app/config:ro - ./adminfront/seed-tenant.csv:/app/seed-tenant.csv:ro command: ["go", "run", "./cmd/server"] healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/health"] interval: 10s timeout: 5s retries: 3 start_period: 10s adminfront: build: context: . dockerfile: ./adminfront/Dockerfile container_name: baron_adminfront env_file: - .env environment: - APP_ENV=${APP_ENV:-development} - API_PROXY_TARGET=http://baron_backend:3000 - USERFRONT_URL=${USERFRONT_URL} ports: - "${ADMINFRONT_PORT:-5173}:5173" volumes: - ./adminfront:/workspace/adminfront - ./common:/common - ./common:/workspace/common - /workspace/common/node_modules - ./locales:/locales - ./locales:/workspace/locales - /workspace/adminfront/node_modules networks: - baron_net devfront: build: context: . dockerfile: ./devfront/Dockerfile container_name: baron_devfront env_file: - .env environment: - APP_ENV=${APP_ENV:-development} - API_PROXY_TARGET=http://baron_backend:3000 - USERFRONT_URL=${USERFRONT_URL} ports: - "${DEVFRONT_PORT:-5174}:5173" volumes: - ./devfront:/workspace/devfront - ./common:/common - ./common:/workspace/common - /workspace/common/node_modules - ./locales:/locales - ./locales:/workspace/locales - /workspace/devfront/node_modules networks: - baron_net orgfront: build: context: . dockerfile: ./orgfront/Dockerfile container_name: baron_orgfront env_file: - .env environment: - APP_ENV=${APP_ENV:-development} - API_PROXY_TARGET=http://baron_backend:3000 - USERFRONT_URL=${USERFRONT_URL} ports: - "${ORGFRONT_PORT:-5175}:5175" volumes: - ./orgfront:/workspace/orgfront - ./common:/common - ./common:/workspace/common - /workspace/common/node_modules - ./locales:/locales - ./locales:/workspace/locales - /workspace/orgfront/node_modules networks: - baron_net userfront: build: context: . dockerfile: userfront/Dockerfile target: ${USERFRONT_BUILD_TARGET:-dev} container_name: baron_userfront env_file: - .env environment: - BACKEND_URL=${BACKEND_URL:-} - USERFRONT_URL=${USERFRONT_URL} - APP_ENV=${APP_ENV} - USERFRONT_INTERNAL_PORT=5000 volumes: - ./userfront/lib:/workspace/userfront/lib - ./userfront/assets:/workspace/userfront/assets - ./userfront/web:/workspace/userfront/web - ./userfront/scripts:/workspace/userfront/scripts:ro - ./scripts:/workspace/scripts:ro - ./locales:/workspace/locales:ro networks: - baron_net - ory-net depends_on: backend: condition: service_healthy healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:5000/"] interval: 10s timeout: 5s retries: 3 start_period: 10s # 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_net ory-net: external: true name: ory-net public_net: external: true name: public_net