Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mélanie Chauvel
funkwhale
Commits
7205a8b2
Verified
Commit
7205a8b2
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Development nginx container now work with customized port
parent
96d219df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
deploy/funkwhale_proxy.conf
+2
-2
2 additions, 2 deletions
deploy/funkwhale_proxy.conf
dev.yml
+5
-0
5 additions, 0 deletions
dev.yml
docker/nginx/conf.dev
+4
-15
4 additions, 15 deletions
docker/nginx/conf.dev
docker/nginx/entrypoint.sh
+9
-0
9 additions, 0 deletions
docker/nginx/entrypoint.sh
with
20 additions
and
17 deletions
deploy/funkwhale_proxy.conf
+
2
−
2
View file @
7205a8b2
...
...
@@ -3,8 +3,8 @@ proxy_set_header Host $host;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
X
-
Forwarded
-
Proto
$
scheme
;
proxy_set_header
X
-
Forwarded
-
Host
$
host
:$
server_port
;
proxy_set_header
X
-
Forwarded
-
Port
$
server_port
;
proxy_set_header
X
-
Forwarded
-
Host
$
host
:$
server_port
;
proxy_set_header
X
-
Forwarded
-
Port
$
server_port
;
proxy_redirect
off
;
# websocket support
...
...
This diff is collapsed.
Click to expand it.
dev.yml
+
5
−
0
View file @
7205a8b2
...
...
@@ -72,15 +72,20 @@ services:
-
redis
nginx
:
command
:
/entrypoint.sh
env_file
:
-
.env.dev
-
.env
image
:
nginx
environment
:
-
"
WEBPACK_DEVSERVER_PORT=${WEBPACK_DEVSERVER_PORT-8080}"
links
:
-
api
-
front
volumes
:
-
./docker/nginx/conf.dev:/etc/nginx/nginx.conf
-
./docker/nginx/entrypoint.sh:/entrypoint.sh:ro
-
./deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf.template:ro
-
./api/funkwhale_api/media:/protected/media
ports
:
-
"
0.0.0.0:6001:6001"
...
...
This diff is collapsed.
Click to expand it.
docker/nginx/conf.dev
+
4
−
15
View file @
7205a8b2
...
...
@@ -37,19 +37,7 @@ http {
listen 6001;
charset utf-8;
client_max_body_size 20M;
# global proxy pass config
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host localhost:8080;
proxy_set_header X-Forwarded-Port 8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_redirect off;
include /etc/nginx/funkwhale_proxy.conf;
location /_protected/media {
internal;
alias /protected/media;
...
...
@@ -63,8 +51,7 @@ http {
if ($request_uri ~* "[^\?]+\?(.*)$") {
set $query $1;
}
proxy_set_header X-Forwarded-Host localhost:8080;
proxy_set_header X-Forwarded-Port 8080;
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://api:12081/api/v1/trackfiles/viewable/?$query;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
...
...
@@ -78,6 +65,7 @@ http {
if ($args ~ (.*)jwt=[^&]*(.*)) {
set $cleaned_args $1$2;
}
include /etc/nginx/funkwhale_proxy.conf;
proxy_cache_key "$scheme$request_method$host$uri$is_args$cleaned_args";
proxy_cache transcode;
proxy_cache_valid 200 7d;
...
...
@@ -87,6 +75,7 @@ http {
proxy_pass http://api:12081;
}
location / {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://api:12081/;
}
}
...
...
This diff is collapsed.
Click to expand it.
docker/nginx/entrypoint.sh
0 → 100755
+
9
−
0
View file @
7205a8b2
#!/bin/bash -eux
echo
"Copying template file..."
cp
/etc/nginx/funkwhale_proxy.conf
{
.template,
}
sed
-i
"s/X-Forwarded-Host
\$
host:
\$
server_port/X-Forwarded-Host localhost:
${
WEBPACK_DEVSERVER_PORT
}
/"
/etc/nginx/funkwhale_proxy.conf
sed
-i
"s/proxy_set_header X-Forwarded-Port
\$
server_port/proxy_set_header X-Forwarded-Port
${
WEBPACK_DEVSERVER_PORT
}
/"
/etc/nginx/funkwhale_proxy.conf
cat
/etc/nginx/funkwhale_proxy.conf
nginx
-g
"daemon off;"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment