Skip to content

Commit

Permalink
Fix example app configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreGauthier committed Sep 3, 2024
1 parent bdc70f8 commit 2a39a70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- API_UPSTREAM=${API_UPSTREAM:-php:9000}
- PWA_SERVER_NAME=${PWA_SERVER_NAME:-gally.localhost}
- PWA_UPSTREAM=${PWA_UPSTREAM:-pwa:3000}
- EXAMPLE_UPSTREAM=${PWA_UPSTREAM:-pwa:3000}

php:
build:
Expand Down
12 changes: 1 addition & 11 deletions docker/router/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ upstream fastcgi_backend {
server "$API_UPSTREAM";
}

# Test if example app upstream is defined
map $EXAMPLE_UPSTREAM $example_upstream {
default $EXAMPLE_UPSTREAM;
"" "not_defined";
}

server {
server_name $PWA_SERVER_NAME;
root /app/public;
Expand All @@ -18,11 +12,7 @@ server {
}

location ~ ^/(example|ws) {
if ($example_upstream = "not_defined") {
return 404;
}

proxy_pass http://$example_upstream;
proxy_pass http://$EXAMPLE_UPSTREAM;
}

# WebSocket support
Expand Down

0 comments on commit 2a39a70

Please sign in to comment.