invalid character 'C' looking for beginning of value on command "hydra clients create" #2280
Answered
by
drgarcia1986
drgarcia1986
asked this question in
Q&A
-
Hi, I tried to run hydra (with docker) on my machine with this version: '3.7'
services:
hydra-migrate:
image: oryd/hydra:v1.9.0-alpha.3
environment:
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
- SECRETS_SYSTEM=<my-secret>
command:
migrate sql -e --yes
networks:
- intranet
hydra:
image: oryd/hydra:v1.9.0-alpha.3
environment:
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
- SECRETS_SYSTEM=<my-secret>
networks:
- intranet
depends_on:
- hydra-migrate
restart: on-failure
postgresd:
image: postgres:9.6
ports:
- "5432:5432"
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=hydra
networks:
- intranet
consent:
environment:
- HYDRA_ADMIN_URL=http://hydra:4445
image: oryd/hydra-login-consent-node:v1.9.0-alpha.3
ports:
- "3000:3000"
restart: unless-stopped
networks:
- intranet
networks:
intranet: Everything looks ok until I tried to create a hydra client: $ docker-compose -f ory-hydra-postgres.yml exec hydra \
hydra clients create \
--endpoint http://127.0.0.1:4445/ \
--id my-client \
--secret secret \
-g client_credentials After that command I received this error:
Looks like a Json decode error, but I don't know why. |
Beta Was this translation helpful? Give feedback.
Answered by
drgarcia1986
Jan 5, 2021
Replies: 1 comment 4 replies
-
I changed a bit the compose file and now it's work 🤔 version: '3.7'
services:
hydra-migrate:
image: oryd/hydra:v1.9.0-alpha.3
environment:
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
- SECRETS_SYSTEM=<my-secret>
command:
migrate -c /etc/config/hydra/hydra.yml sql -e --yes
volumes:
-
type: bind
source: ./contrib/quickstart/5-min
target: /etc/config/hydra
networks:
- intranet
hydra:
image: oryd/hydra:v1.9.0-alpha.3
environment:
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
- SECRETS_SYSTEM=<my-secret>
command: serve -c /etc/config/hydra/hydra.yml all --dangerous-force-http
volumes:
-
type: bind
source: ./contrib/quickstart/5-min
target: /etc/config/hydra
networks:
- intranet
depends_on:
- hydra-migrate
restart: on-failure
postgresd:
image: postgres:9.6
ports:
- "5432:5432"
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=hydra
networks:
- intranet
consent:
environment:
- HYDRA_ADMIN_URL=http://hydra:4445
image: oryd/hydra-login-consent-node:v1.9.0-alpha.3
ports:
- "3000:3000"
restart: unless-stopped
networks:
- intranet
networks:
intranet: the big deal is that I added the serve:
cookies:
same_site_mode: Lax
urls:
self:
issuer: http://127.0.0.1:4444
consent: http://127.0.0.1:3000/consent
login: http://127.0.0.1:3000/login
logout: http://127.0.0.1:3000/logout
secrets:
system:
- <my-secret>
oidc:
subject_identifiers:
supported_types:
- pairwise
- public
pairwise:
salt: youReallyNeedToChangeThis
Is there an explanation for it? |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
drgarcia1986
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I changed a bit the compose file and now it's work 🤔