Commit 2cbd537f authored by Agate's avatar Agate 💬

Last tweaks to Nginx conf and media / static conf, it seems to work at least locally

parent d264e1ec
#Funkwhale demo
# Funkwhale demo
You simply need to download demo tracks (courtesy of Jamendo):
# Installation
Clone the repository:
cd /srv
git clone ssh:// funkwhale-demo
cd funkwhale-demo
Download demo tracks (courtesy of Jamendo):
......@@ -10,4 +18,10 @@ Then set up everything:
This will take care of pulling git repositories, spin up docker containers, etc.
`./setup-demo` may be called multiple times if you want to update the demo to newer versions.
Deploy nginx config:
cp nginx.conf /etc/nginx/conf.d/funkwhale-demo.conf
# Upgrading
`./setup-demo` may be called whenever if you want to update the demo to newer versions.
upstream api {
server localhost:6001;
server {
listen 80;
## redirect http to https ##
rewrite ^ https://$server_name$request_uri? permanent;
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/;
ssl_certificate_key /etc/ssl/;
root /srv/funkwhale-demo/front/dist;
location / {
try_files $uri $uri/ @rewrites;
location @rewrites {
rewrite ^(.+)$ /index.html last;
location /api {
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 https;
proxy_redirect off;
proxy_pass http://api/;
location /media/ {
alias /srv/funkwhale-demo/api/media/;
location /staticfiles/ {
alias /srv/funkwhale-demo/api/staticfiles/;
......@@ -22,7 +22,8 @@ echo "Setting up front .env file..."
cp ./front-env front/.env
echo "Stopping previous demo..."
docker-compose -p funkwhale_demo_api -f api/dev.yml down -v
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml run api rm -rf media
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml down -v
docker-compose -p funkwhale_demo_front -f front/dev.yml down -v
rm -rf api/funkwhale_api/media
......@@ -30,8 +31,9 @@ echo "Compiling front-end files..."
docker-compose -p funkwhale_demo_front -f front/dev.yml run app npm run build
echo "Configuring api..."
docker-compose -p funkwhale_demo_api -f api/dev.yml up -d postgres
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml build
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml up -d postgres
sleep 5
docker-compose -p funkwhale_demo_api -f api/dev.yml run django ./demo/
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml run api ./demo/
docker-compose -p funkwhale_demo_api -f api/dev.yml up -d
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml up -d
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment