summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--dev/nginx/pwman-go.conf23
2 files changed, 21 insertions, 9 deletions
diff --git a/README.md b/README.md
index bb54968..a902497 100644
--- a/README.md
+++ b/README.md
@@ -57,10 +57,11 @@ You can use docker-compose to get up and running. `docker-compose up --build` wi
For rapid testing that does not need to build docker images you can choose to just start the dependencies.
```
-# edit dev/nginx/pwman-go.conf to not have upstream pwman:3000
# In one window
-docker-compose up openldap krb5 nginx
+docker-compose up
# In another (hacky since it is not under gopath)
-go run !(*_test).go -ldap-password secretpw -ldap-port 6636 -ldap-ssl-skip-verify -csrf-insecure -krb5-config dev/krb5.conf -changepw-script data/pwman/log-principal.pl
+go run !(*_test).go -ldap-password secretpw -ldap-port 6636 -ldap-ssl-skip-verify -csrf-insecure -krb5-config dev/krb5.conf -changepw-script data/pwman/log-principal.pl -base-path /dev
+
+# You can now access it on http://localhost/dev
```
diff --git a/dev/nginx/pwman-go.conf b/dev/nginx/pwman-go.conf
index 9ff8c95..5dc887d 100644
--- a/dev/nginx/pwman-go.conf
+++ b/dev/nginx/pwman-go.conf
@@ -1,24 +1,35 @@
-upstream backend {
- server pwman:3000;
- server host.docker.internal:3000 backup;
-}
server {
listen 80;
server_name pwman.test;
location / {
- #proxy_pass http://docker.for.mac.host.internal:3000;
- proxy_pass http://backend;
+ proxy_pass http://pwman:3000;
proxy_set_header SCRIPT_NAME /sso;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Remote-User 'markus@nordu.net';
+
proxy_set_header GIVENNAME 'Märkus';
proxy_set_header SN 'Krøgh';
proxy_set_header MAIL 'markus@nordu.net';
proxy_set_header AFFILIATION 'employee@nordu.net';
}
+
+ location /dev {
+ proxy_pass http://docker.for.mac.host.internal:3000;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Port $server_port;
+ proxy_set_header X-Remote-User 'markus@nordu.net';
+
+ proxy_set_header GIVENNAME 'Märkus';
+ proxy_set_header SN 'Krøgh';
+ proxy_set_header MAIL 'markus@nordu.net';
+ proxy_set_header AFFILIATION 'employee@nordu.net';
+
+ }
}