Below is my docker compose file:
version: "3"
services:
hydra-migrate:
image: oryd/hydra:v1.0.0-rc.8_oryOS.10
container_name: hydra_migrate
environment:
- DSN=mysql://${DB_USER}:${DB_PASS}@tcp(${DB_HOST}:${DB_PORT})/${DB_NAME}?parseTime=true
- LOG_LEVEL=${LOG_LEVEL}
command: migrate sql -e
restart: on-failure
hydra:
image: oryd/hydra:v1.0.0-rc.8_oryOS.10
container_name: hydra
depends_on:
- hydra-migrate
ports:
- "${PUBLIC_PORT}:${PUBLIC_PORT}"
- "${ADMIN_PORT}:${ADMIN_PORT}"
command: serve all --dangerous-force-http
environment:
- LOG_LEVEL=${LOG_LEVEL}
- LOG_FORMAT=${LOG_FORMAT}
- SERVE_PUBLIC_HOST=${PUBLIC_HOST}
- SERVE_PUBLIC_PORT=${PUBLIC_PORT}
- SERVE_PUBLIC_CORS_ENABLED=${CORS_ENABLED}
- SERVE_PUBLIC_CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
- SERVE_PUBLIC_CORS_DEBUG=${CORS_DEBUG}
- SERVE_ADMIN_HOST=${ADMIN_HOST}
- SERVE_ADMIN_PORT=${ADMIN_PORT}
- SERVE_ADMIN_CORS_ENABLED=${CORS_ENABLED}
- SERVE_ADMIN_CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
- SERVE_ADMIN_CORS_DEBUG=${CORS_DEBUG}
- DSN=mysql://${DB_USER}:${DB_PASS}@tcp(${DB_HOST}:${DB_PORT})/${DB_NAME}?parseTime=true
- WEBFINGER_OIDC_DISCOVERY_CLIENT_REGISTRATION_URL=${ADMIN_CONSOLE_URL}
- WEBFINGER_OIDC_DISCOVERY_SUPPORTED_CLAIMS=email,email_verified,name,family_name,given_name,profile
- WEBFINGER_OIDC_DISCOVERY_USERINFO_URL=${PUBLIC_URL}/userinfo
- URLS_SELF_ISSUER=${PUBLIC_URL}
- URLS_SELF_PUBLIC=${PUBLIC_URL}
- URLS_CONSENT=${IDP_URL}/authorize
- URLS_LOGIN=${IDP_URL}/login
- URLS_POST_LOGOUT_REDIRECT=${IDP_URL}/logout
- URLS_ERROR=${IDP_URL}/error
- OAUTH2_TTL_AUTH_CODE=${TTL_AUTH_CODE}
- OAUTH2_TTL_ID_TOKEN=${TTL_ID_TOKEN}
- OAUTH2_TTL_ACCESS_TOKEN=${TTL_ACCESS_TOKEN}
- OAUTH2_TTL_REFRESH_TOKEN=${TTL_REFRESH_TOKEN}
- OAUTH2_TTL_LOGIN_CONSENT_REQUEST=${TTL_LOGIN_CONSENT_REQUEST}
- OAUTH2_EXPOSE_INTERNAL_ERRORS=${EXPOSE_ERRORS}
- SECRETS_SYSTEM=${SYSTEM_SECRET}
- SECRETS_COOKIE=${COOKIE_SECRET}
restart: unless-stopped