I'm trying to use hydra with docker-compose.
version: '2'
services:
consent:
build: .
links:
- hydra
- rethinkdb:database
ports:
- "3000:3000"
depends_on:
- rethinkdb
restart: unless-stopped
hydra:
image: oryam/hydra
volumes:
- hydravolume:/root
links:
- rethinkdb:database
depends_on:
- rethinkdb
ports:
- "4444:4444"
environment:
- SYSTEM_SECRET=${SYSTEM_SECRET}
- CONSENT_URL=http://${DOCKER_IP}:3000
- DATABASE_URL=rethinkdb://database:28015/hydra
restart: unless-stopped
rethinkdb:
image: rethinkdb
ports:
- "8080:8080"
- "28015:28015"
- "29015:29015"
volumes:
hydravolume:
driver: local
When I start it with docker-compose-up the first time everything is fine but if I launch it again:
hydra_1 | time="2016-06-15T14:00:58Z" level=info msg="DATABASE_URL set, connecting to RethinkDB."
hydra_1 | time="2016-06-15T14:00:58Z" level=info msg="Connecting with RethinkDB: rethinkdb://database:28015/hydra (database:28015) (hydra)"
hydra_1 | time="2016-06-15T14:00:58Z" level=info msg="Connected to RethinkDB!"
hydra_1 | time="2016-06-15T14:00:58Z" level=fatal msg="Could not fetch initial state: gorethink: Cannot perform read: primary replica for shard [\"\", +inf) not available in: \nr.Table(\"hydra_policies\")"
hydra_1 | Pointing cluster at https://localhost:4444
Because I put restart: unless-stopped it stops and starts a few times before:
hydra_1 | time="2016-06-15T14:02:25Z" level=info msg="DATABASE_URL set, connecting to RethinkDB."
hydra_1 | time="2016-06-15T14:02:25Z" level=info msg="Connecting with RethinkDB: rethinkdb://database:28015/hydra (database:28015) (hydra)"
hydra_1 | time="2016-06-15T14:02:25Z" level=info msg="Connected to RethinkDB!"
hydra_1 | time="2016-06-15T14:02:25Z" level=fatal msg="Could not fetch initial state: cipher: message authentication failed"
I'm trying to use hydra with docker-compose.
When I start it with
docker-compose-upthe first time everything is fine but if I launch it again:Because I put
restart: unless-stoppedit stops and starts a few times before: