...
 
Commits (2)
......@@ -8,29 +8,29 @@ stages:
- test
- deploy
# build-golang:
# stage: build
# before_script:
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# script:
# - printenv
# - docker pull $CI_REGISTRY_IMAGE/customer:latest || true
# - docker build --cache-from $CI_REGISTRY_IMAGE/go-factory:latest --tag $CI_REGISTRY_IMAGE/go-factory/$CI_COMMIT_REF_SLUG:latest -f go-factory.Dockerfile .
# - docker push $CI_REGISTRY_IMAGE/go-factory/$CI_COMMIT_REF_SLUG:latest
# build-admin:
# stage: build
# before_script:
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# script:
# - printenv
# - docker pull $CI_REGISTRY_IMAGE/admin:latest || true
# - docker build --cache-from $CI_REGISTRY_IMAGE/admin:latest --tag $CI_REGISTRY_IMAGE/admin/$CI_COMMIT_REF_SLUG:latest ./admin
# - docker push $CI_REGISTRY_IMAGE/admin/$CI_COMMIT_REF_SLUG:latest
# variables:
# REACT_APP_GATEWAY_SERVICE_URL: https://api.$KUBE_INGRESS_BASE_DOMAIN/graphql
# REACT_APP_HYDRA_CLUSTER_URL: https://hydra.$KUBE_INGRESS_BASE_DOMAIN
# REACT_APP_DISABLE_AUTH: "False"
build-golang:
stage: build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- printenv
- docker pull $CI_REGISTRY_IMAGE/customer:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE/go-factory:latest --tag $CI_REGISTRY_IMAGE/go-factory/$CI_COMMIT_REF_SLUG:latest -f go-factory.Dockerfile .
- docker push $CI_REGISTRY_IMAGE/go-factory/$CI_COMMIT_REF_SLUG:latest
build-admin:
stage: build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- printenv
- docker pull $CI_REGISTRY_IMAGE/admin:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE/admin:latest --tag $CI_REGISTRY_IMAGE/admin/$CI_COMMIT_REF_SLUG:latest ./admin
- docker push $CI_REGISTRY_IMAGE/admin/$CI_COMMIT_REF_SLUG:latest
variables:
REACT_APP_GATEWAY_SERVICE_URL: https://api.$KUBE_INGRESS_BASE_DOMAIN/graphql
REACT_APP_HYDRA_CLUSTER_URL: https://hydra.$KUBE_INGRESS_BASE_DOMAIN
REACT_APP_DISABLE_AUTH: "False"
......@@ -83,7 +83,7 @@ deploy:
- TILLER_NAMESPACE=$KUBE_NAMESPACE HELM_HOST="localhost:44134" helm upgrade --install hydra --set resources=false,postgresqlUsername=admin,postgresqlPassword=admin,postgresqlDatabase=hydra,persistence.size=1Gi stable/postgresql
- envsubst < kubernetes/hydra.yml | kubectl apply -f -
- kubectl rollout status -w deployment/hydra
- kubectl run hydra-client --image=oryd/hydra:v1.0.8-alpine -i --rm --restart=Never --env="HYDRA_ADMIN_URL=http://hydra:4445" -- clients create --skip-tls-verify --id test --secret testtest --grant-types authorization_code,refresh_token,client_credentials,implicit,introspect --response-types token,code,id_token --scope openid,offline --callbacks https://admin.$KUBE_INGRESS_BASE_DOMAIN/login/callback || true
- kubectl run hydra-client --image=oryd/hydra:v1.0.8-alpine -i --rm --restart=Never --env="HYDRA_ADMIN_URL=http://hydra:4445" -- clients create --skip-tls-verify --id test --secret testtest --grant-types authorization_code,refresh_token,client_credentials,implicit,introspect --response-types token,code,id_token --scope openid,offline --callbacks http://admin.$KUBE_INGRESS_BASE_DOMAIN/login/callback --callbacks https://admin.$KUBE_INGRESS_BASE_DOMAIN/login/callback || true
- TILLER_NAMESPACE=$KUBE_NAMESPACE HELM_HOST="localhost:44134" helm upgrade --install login --set resources=false,postgresqlUsername=admin,postgresqlPassword=admin,postgresqlDatabase=login,persistence.size=1Gi stable/postgresql
- envsubst < kubernetes/login.yml | kubectl apply -f -
......
......@@ -34,13 +34,12 @@ export const clientSecret = 'testtest'; //process.env.REACT_APP_HYDRA_CLIENT_SEC
console.log(process.env.REACT_APP_HYDRA_CLUSTER_URL);
let oauth2 = new JSO({
providerID: "hydra",
client_id: "test",
client_secret: clientSecret,
response_type: 'code',
redirect_uri: 'http://' + window.location.host + '/login/callback',
redirect_uri: window.location.protocol + '//' + window.location.host + '/login/callback',
authorization: process.env.REACT_APP_HYDRA_CLUSTER_URL + '/oauth2/auth',
token: process.env.REACT_APP_HYDRA_CLUSTER_URL + '/oauth2/token',
scopes: { request: ['offline', 'openid'] },
......
......@@ -311,9 +311,9 @@ services:
REACT_APP_GATEWAY_SERVICE_URL: "http://localhost:5001/graphql"
REACT_APP_HYDRA_CLUSTER_URL: "http://localhost:5002"
# Uncomment to link to your local dev environment
# command: ["yarn", "run", "start"]
# volumes:
# - "$GOPATH/src/gitlab.com/empowerlab/example/admin:/opt/app-root"
command: ["yarn", "run", "start"]
volumes:
- "$GOPATH/src/gitlab.com/empowerlab/example/admin:/opt/app-root"
networks:
empower:
\ No newline at end of file
empower: