From 84f131387845a1f0246d40b074d446ec58b014c0 Mon Sep 17 00:00:00 2001 From: arekkas Date: Sat, 7 Jul 2018 11:15:09 +0200 Subject: [PATCH] Adds docker-compose example with postgres --- docker-compose.yml | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..297ea4ef36 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,74 @@ +########################################################################### +####### FOR DEMONSTRATION PURPOSES ONLY ####### +########################################################################### +# # +# If you have not yet read the tutorial, do so now: # +# https://ory-am.gitbooks.io/hydra/content/tutorial.html # +# # +# This set up is only for demonstration purposes. The login # +# endpoint can only be used if you follow the steps in the tutorial. # +# # +########################################################################### + +version: '2' + +services: + + oathkeeper-migrate: + build: + context: . + dockerfile: Dockerfile + links: + - postgresd:postgresd + environment: + - LOG_LEVEL=debug + command: + migrate sql postgres://dbuser:secret@postgresd:5432/accesscontroldb?sslmode=disable + restart: on-failure + + oathkeeper-proxy: + build: + context: . + dockerfile: Dockerfile + links: + - postgresd:postgresd + ports: + - "4455:4455" + depends_on: + - oathkeeper-api + command: + serve proxy + environment: + - LOG_LEVEL=debug + - PORT=4455 + - ISSUER_URL=http://localhost:4455/ + - OATHKEEPER_API_URL=http://oathkeeper-api:4456 + - CREDENTIALS_ISSUER_ID_TOKEN_HS256_SECRET=arandomsecretarandomsecretarando + restart: on-failure + + oathkeeper-api: + build: + context: . + dockerfile: Dockerfile + links: + - postgresd:postgresd + ports: + - "4456:4456" + depends_on: + - oathkeeper-migrate + command: + serve api + environment: + - LOG_LEVEL=debug + - PORT=4456 + - DATABASE_URL=postgres://dbuser:secret@postgresd:5432/accesscontroldb?sslmode=disable + - ISSUER_URL=http://localhost:4455/ + - CREDENTIALS_ISSUER_ID_TOKEN_HS256_SECRET=arandomsecretarandomsecretarando + restart: on-failure + + postgresd: + image: postgres:9.6 + environment: + - POSTGRES_USER=dbuser + - POSTGRES_PASSWORD=secret + - POSTGRES_DB=accesscontroldb