Last active
September 16, 2022 07:21
-
-
Save andreypopp/45e0c4f3f2da6d368a8d746487e3cfaf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docker-compose.yml b/docker-compose.yml | |
index 81b910aac..1b8c62512 100644 | |
--- a/docker-compose.yml | |
+++ b/docker-compose.yml | |
@@ -69,37 +69,19 @@ services: | |
- -exc | |
- | | |
cat > /etc/nginx/conf.d/default.conf <<'EOF' | |
- map $$uri $$app_user { | |
- "~^(/~(?<user>[^/]+))" $$user; | |
- default [email protected]; | |
- } | |
- map $$host$$uri $$app_socket { | |
- "~^([^/]+)(/~[^/]+)?(/@(?<app>[^/]+))" /run/app/$$app.socket; | |
- "~^(?<app>[^/]+)\.localhost/" /run/app/$$app.socket; | |
- default /run/app/socket; | |
- } | |
- map $$uri $$app_prefix { | |
- "~^(?<prefix>(/~[^/]+)?(/@[^/]+)?)" $$prefix; | |
- } | |
- map $$uri $$app_path { | |
- "~^(/~[^/]+)?(/@[^/]+)?(?<path>.*)" $$path; | |
- } | |
server { | |
listen 80; | |
server_name .localhost; | |
location / { | |
- if ($$app_path = "") { | |
- return 302 $$scheme://$$http_host$$uri/; | |
- } | |
auth_request /oauth2/auth; | |
auth_request_set $$app_user $$upstream_http_x_auth_request_email; | |
error_page 401 = /oauth2/sign_in?rd=$$request_uri; | |
- uwsgi_pass unix://$$app_socket; | |
+ uwsgi_pass develop:8080; | |
uwsgi_modifier1 30; | |
include uwsgi_params; | |
- uwsgi_param SCRIPT_NAME $$app_prefix if_not_empty; | |
+ uwsgi_param SCRIPT_NAME "/admin" if_not_empty; | |
uwsgi_param REMOTE_USER $$app_user if_not_empty; | |
} | |
location = /logout { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment