GithubHelp home page GithubHelp logo

hydra-docker's Introduction

hydra-docker

Dockerfile source for Ory Hydra docker image.

Upstream

This source repo was originally copied from: https://github.com/ory/hydra

Disclaimer

This is not an official Google product.

About

This image contains an installation of Ory Hydra.

For more information, see the Official Image Marketplace Page.

Prerequisites

Configure gcloud as a Docker credential helper:

gcloud auth configure-docker

Pull command

docker -- pull marketplace.gcr.io/google/hydra

Dockerfile for this image can be found here.

Running Ory Hydra

This section describes how to spin up a Ory Hydra service using this image.

Runnung Hydra with PostgreSQL Datadase service

First, let's create a network for our Hydra setup.

docker network create hydra

Hydra requires a separate PostgreSQL 9.6+ (or MySQL 5.7+ or SQLite) service which needs to be run in another container.

docker run \
  --network hydraguide \
  --name ory-hydra-example--postgres \
  -e POSTGRES_USER=hydra \
  -e POSTGRES_PASSWORD=secret \
  -e POSTGRES_DB=hydra \
  -d marketplace.gcr.io/google/postgresql:13.4

When installing a new version of Hydra, or upgrading an existing installation we have to run SQL migrations.

docker run -it --rm \
  --network hydraguide \
  oryd/hydra:v1.10.6 \
  migrate sql --yes postgres://hydra:secret@ory-hydra-example--postgres:5432/hydra?sslmode=disable

Finally, we can run the Hydra server.

docker run -d \
  --name some-hydra \
  --network hydra \
  -p 5444:4444 \
  -p 5445:4445 \
  -e SECRETS_SYSTEM=3AD1LUmKa9ZMWFHeQ8uLdno8rX7haoog \
  -e DSN=postgres://hydra:secret@ory-hydra-example--postgres:5432/hydra?sslmode=disable \
  -e URLS_SELF_ISSUER=https://localhost:5444/ \
  -e URLS_CONSENT=http://localhost:9020/consent \
  -e URLS_LOGIN=http://localhost:9020/login \
  oryd/hydra:v1.10.6 serve all

References

Ports

ORY Hydra serves APIs via two ports:

Port Description
TCP 4444 Public port.
TCP 4445 Administrative port.

hydra-docker's People

Contributors

matt-jns avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.