Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
043153a5
Verified
Commit
043153a5
authored
Mar 31, 2018
by
Eliot Berriot
Browse files
Set host properly on nginx dev container
parent
99e7e98b
Changes
1
Hide whitespace changes
Inline
Side-by-side
docker/nginx/entrypoint.sh
View file @
043153a5
#!/bin/bash -eux
FIRST_HOST
=
$(
echo
${
DJANGO_ALLOWED_HOSTS
}
|
cut
-d
,
-f1
)
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/X-Forwarded-Host
\$
host:
\$
server_port/X-Forwarded-Host
${
FIRST_HOST
}
:
${
WEBPACK_DEVSERVER_PORT
}
/"
/etc/nginx/funkwhale_proxy.conf
sed
-i
"s/proxy_set_header Host
\$
host/proxy_set_header Host
${
FIRST_HOST
}
/"
/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
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment