@@ -47,8 +47,8 @@ services:
4747 context : .
4848 environment :
4949 UPSTREAM_URL : ${UPSTREAM_URL:-http://stac:8001}
50- OIDC_DISCOVERY_URL : ${OIDC_DISCOVERY_URL:-http://127.0.0.1:5556/dex /.well-known/openid-configuration}
51- OIDC_DISCOVERY_INTERNAL_URL : ${OIDC_DISCOVERY_INTERNAL_URL:-http://dex:5556/dex /.well-known/openid-configuration}
50+ OIDC_DISCOVERY_URL : ${OIDC_DISCOVERY_URL:-http://127.0.0.1:3000 /.well-known/openid-configuration}
51+ OIDC_DISCOVERY_INTERNAL_URL : ${OIDC_DISCOVERY_INTERNAL_URL:-http://auth0:3000 /.well-known/openid-configuration}
5252 env_file :
5353 - path : .env
5454 required : false
@@ -57,13 +57,83 @@ services:
5757 volumes :
5858 - ./src:/app/src
5959
60- dex :
61- image : ghcr.io/dexidp/dex:latest
60+ # dex:
61+ # image: ghcr.io/dexidp/dex:v2.42.0-alpine
62+ # ports:
63+ # - "5556:5556"
64+ # volumes:
65+ # - ./examples/dex/config.yaml:/etc/dex/cfg/config.yaml
66+ # entrypoint: ["dex", "serve", "/etc/dex/cfg/config.yaml"]
67+
68+ # hydra:
69+ # image: oryd/hydra:v2.2.0
70+ # ports:
71+ # - "4444:4444"
72+ # - "4445:4445"
73+ # environment:
74+ # - DSN=memory
75+ # - URLS_SELF_ISSUER=http://localhost:4444
76+ # - URLS_CONSENT=http://localhost:3000/consent
77+ # - URLS_LOGIN=http://localhost:3000/login
78+ # - SECRETS_SYSTEM=youReallyNeedToChangeThis
79+ # - LOG_LEAK_SENSITIVE_VALUES=true
80+ # - SERVE_PUBLIC_CORS_ENABLED=true
81+ # - SERVE_PUBLIC_CORS_ALLOWED_ORIGINS=*
82+ # - SERVE_PUBLIC_CORS_ALLOWED_METHODS=POST,GET,PUT,DELETE,OPTIONS
83+ # - SERVE_PUBLIC_CORS_ALLOWED_HEADERS=Authorization,Content-Type,Accept
84+ # - SERVE_PUBLIC_CORS_EXPOSED_HEADERS=Content-Type
85+ # - SERVE_PUBLIC_CORS_DEBUG=true
86+ # - SERVE_TLS_KEY_PATH=
87+ # - SERVE_TLS_CERT_PATH=
88+ # command: serve all --dev
89+
90+ # login-consent-app:
91+ # image: oryd/hydra-login-consent-node:v2.0.3
92+ # ports:
93+ # - "3000:3000"
94+ # environment:
95+ # - HYDRA_ADMIN_URL=http://hydra:4445
96+ # - NODE_TLS_REJECT_UNAUTHORIZED=0
97+
98+ # hydra-setup:
99+ # image: curlimages/curl:8.5.0
100+ # depends_on:
101+ # - hydra
102+ # entrypoint: ["/bin/sh", "-c"]
103+ # command: |
104+ # '
105+ # until curl -s http://hydra:4445/health/ready; do
106+ # echo "Waiting for Hydra to be ready..."
107+ # sleep 1
108+ # done
109+
110+ # echo "Registering OIDC client..."
111+ # curl --verbose -X POST http://hydra:4445/admin/clients \
112+ # -H "Content-Type: application/json" \
113+ # -d @- <<EOF
114+ # {
115+ # "client_id": "stac",
116+ # "client_secret": "secret",
117+ # "grant_types": ["authorization_code", "refresh_token"],
118+ # "response_types": ["code", "id_token"],
119+ # "redirect_uris": ["http://localhost:8000/docs/oauth2-redirect"],
120+ # "scope": "openid offline",
121+ # "token_endpoint_auth_method": "client_secret_post"
122+ # } EOF
123+ # '
124+
125+ auth0 :
126+ image : public.ecr.aws/primaassicurazioni/localauth0:0.8.2
127+ healthcheck :
128+ test : ["CMD", "/localauth0", "healthcheck"]
62129 ports :
63- - " 5556:5556"
64- volumes :
65- - ./examples/dex/config.yaml:/etc/dex/cfg/config.yaml
66- entrypoint : ["dex", "serve", "/etc/dex/cfg/config.yaml"]
130+ - " 3000:3000"
131+ - " 3001:3001"
132+ environment :
133+ LOCALAUTH0_CONFIG : |
134+ issuer = "https://prima.localauth0.com/"
135+ [user_info]
136+ given_name = "Locie"
67137
68138networks :
69139 default :
0 commit comments