version: '3.8' services: web: build: . container_name: liaowang-web ports: - "5000:5000" environment: - DB_HOST=${DB_HOST} - DB_PORT=${DB_PORT:-5432} - DB_USER=${DB_USER} - DB_PASSWORD=${DB_PASSWORD} - DB_NAME=${DB_NAME} - SECRET_KEY=${SECRET_KEY:-change-me-to-a-random-secret} - JWT_SECRET_KEY=${JWT_SECRET_KEY:-jwt-secret-change-me-to-random-string} - SSO_BASE_URL=${SSO_BASE_URL:-http://192.168.92.61:8200} - SSO_CLIENT_ID=${SSO_CLIENT_ID} - SSO_CLIENT_SECRET=${SSO_CLIENT_SECRET} - SSO_REDIRECT_URI=${SSO_REDIRECT_URI:-http://localhost:5000/auth/callback} - SSO_FRONTEND_URL=${SSO_FRONTEND_URL:-http://localhost:5000} - SSO_SCOPE=${SSO_SCOPE:-email} - SSO_LOGOUT_REDIRECT_URL=${SSO_LOGOUT_REDIRECT_URL:-http://192.168.92.61:9200/login} - SAMPLE_CENTER_BASE_URL=${SAMPLE_CENTER_BASE_URL:-http://192.168.92.61} - SAMPLE_CENTER_APP_ID=${SAMPLE_CENTER_APP_ID} - SAMPLE_CENTER_APP_SECRET=${SAMPLE_CENTER_APP_SECRET} env_file: - .env restart: unless-stopped # 健康检查 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5000"] interval: 30s timeout: 10s retries: 3 start_period: 15s