services: backend: build: context: ./backend dockerfile: Dockerfile env_file: - .env.test2 - .generated/auth-config.test2.env environment: - APP_ENV=${APP_ENV:-development} - GO_ENV=${APP_ENV:-development} - COOKIE_SECRET=${COOKIE_SECRET} - JWT_SECRET=${JWT_SECRET} - DB_HOST=postgres - DB_PORT=5432 - DB_NAME=baron_sso - CLICKHOUSE_HOST=clickhouse - CLICKHOUSE_PORT=9000 - CLICKHOUSE_PORT_NATIVE=9000 - REDIS_ADDR=redis:6399 - 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_WRITE_URL=${KETO_WRITE_URL:-http://keto:4467} - PORT=${BACKEND_PORT:-23000} ports: - "${BACKEND_PORT:-23000}:${BACKEND_PORT:-23000}" depends_on: infra_check: condition: service_completed_successfully networks: - test2_net volumes: - ./backend:/app command: ["go", "run", "./cmd/server"] healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:${BACKEND_PORT:-23000}/health"] interval: 10s timeout: 5s retries: 3 start_period: 10s adminfront: build: context: ./adminfront dockerfile: Dockerfile env_file: - .env.test2 - .generated/auth-config.test2.env environment: - APP_ENV=${APP_ENV:-development} - API_PROXY_TARGET=http://backend:23000 - USERFRONT_URL=${USERFRONT_URL} - VITE_OIDC_CLIENT_ID=adminfront - VITE_OIDC_AUTHORITY=https://ssob.hmac.kr/oidc ports: - "${ADMINFRONT_PORT:-25173}:5173" volumes: - ./adminfront:/app - ./locales:/locales - /app/node_modules networks: - test2_net devfront: build: context: ./devfront dockerfile: Dockerfile env_file: - .env.test2 - .generated/auth-config.test2.env environment: - APP_ENV=${APP_ENV:-development} - API_PROXY_TARGET=http://backend:23000 - USERFRONT_URL=${USERFRONT_URL} - VITE_OIDC_CLIENT_ID=devfront - VITE_OIDC_AUTHORITY=https://ssob.hmac.kr/oidc ports: - "${DEVFRONT_PORT:-25174}:5173" volumes: - ./devfront:/app - ./locales:/locales - /app/node_modules networks: - test2_net userfront: build: context: . dockerfile: userfront/Dockerfile env_file: - .env.test2 - .generated/auth-config.test2.env environment: - BACKEND_URL=${BACKEND_URL:-} - USERFRONT_URL=${USERFRONT_URL} - APP_ENV=${APP_ENV} networks: - test2_net depends_on: backend: condition: service_healthy command: > /bin/sh -c "mkdir -p /usr/share/nginx/html/assets && echo \"BACKEND_URL=$${BACKEND_URL}\" >> /usr/share/nginx/html/assets/.env && echo \"USERFRONT_URL=$${USERFRONT_URL}\" >> /usr/share/nginx/html/assets/.env && echo \"APP_ENV=$${APP_ENV}\" >> /usr/share/nginx/html/assets/.env && cp /usr/share/nginx/html/assets/.env /usr/share/nginx/html/.env && nginx -g 'daemon off;'" healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:5000/"] interval: 10s timeout: 5s retries: 3 start_period: 10s infra_check: image: alpine command: ["/bin/sh", "-c", "echo 'Waiting for postgres...'; until nc -z postgres 5432; do sleep 1; done; echo 'Postgres is up!'"] depends_on: postgres: condition: service_healthy networks: - test2_net networks: test2_net: name: test2_net driver: bridge