Docker-based deployment of an ORY Hydra server.
Create a .env
file and set the following environment variables:
HYDRA_IMAGE
: the Hydra Docker image, e.g.oryd/hydra:v1.2.3
URLS_SELF_ISSUER
: URL of the Hydra public APISECRETS_SYSTEM
: secret for encrypting the Hydra database; note that key rotation is not supportedPOSTGRES_HOST
: Hydra database hostname / IP address (n/a for dev deployment)POSTGRES_PASSWORD
: Hydra database passwordODP_IDENTITY_URL
: URL of the ODP Identity service
N.B. Make sure to generate cryptographically strong secrets for SECRETS_SYSTEM
and POSTGRES_PASSWORD
,
and to back these up securely.
In development mode we deploy the Hydra database in a container.
Run the setup script, which initializes the Hydra database:
sudo ./setup-dev.sh
Start the Hydra server + DB containers in the background:
sudo docker-compose -f development.yml up -d
In production mode we assume that the Hydra database has been created externally on a separate server to the Hydra server.
Run the setup script to initialize the Hydra database:
sudo ./setup-prod.sh
Start the Hydra container in the background:
sudo docker-compose -f production.yml up -d
curl --insecure https://localhost:9000/health/ready