Merge branch 'fix-docker-compose' into 'master'

Fix QR code redirection for calculator-cern

Closes #177

See merge request cara/cara!215
This commit is contained in:
Philip James Elson 2021-07-13 10:07:17 +00:00
commit 952078c3c0
3 changed files with 30 additions and 1 deletions

View file

@ -130,6 +130,24 @@ pytest ./cara
s2i build file://$(pwd) --copy --keep-symlinks --context-dir ./app-config/nginx/ centos/nginx-112-centos7 cara-nginx-app
s2i build file://$(pwd) --copy --keep-symlinks --context-dir ./ centos/python-36-centos7 cara-webservice
s2i build file://$(pwd) --copy --keep-symlinks --context-dir ./app-config/auth-service centos/python-36-centos7 auth-service
```
Get the client secret from the CERN Application portal for the `cara-test` app. See [CERN-SSO-integration](#CERN-SSO-integration) for more info.
```
read CLIENT_SECRET
```
Define some env vars (copy/paste):
```
export COOKIE_SECRET=$(openssl rand -hex 50)
export OIDC_SERVER=https://auth.cern.ch/auth
export OIDC_REALM=CERN
export CLIENT_ID=cara-test
export CLIENT_SECRET
```
Run docker-compose:
```
cd app-config
docker-compose up
```

View file

@ -10,6 +10,15 @@ services:
environment:
- COOKIE_SECRET
- APP_NAME=cara-webservice
- CARA_CALCULATOR_PREFIX=/calculator-cern
- CARA_THEME=cara/apps/calculator/themes/cern
cara-calculator-open:
image: cara-webservice
environment:
- COOKIE_SECRET
- APP_NAME=cara-webservice
- CARA_CALCULATOR_PREFIX=/calculator-open
auth-service:
image: auth-service
@ -27,6 +36,8 @@ services:
depends_on:
cara-webservice:
condition: service_started
cara-calculator-open:
condition: service_started
cara-app:
condition: service_started
auth-service:

View file

@ -99,7 +99,7 @@ http {
}
location /calculator {
return 302 /calculator-cern;
return 302 /calculator-cern$is_args$args;
}
location /calculator-cern {