Commit 2cbd537f authored by Eliot Berriot's avatar Eliot Berriot 💬

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://git@code.eliotberriot.com:2222/funkwhale/demo.git funkwhale-demo
cd funkwhale-demo
Download demo tracks (courtesy of Jamendo):
./download-tracks.sh
......@@ -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.
API_AUTHENTICATION_REQUIRED=false
USE_SAMPLE_TRACK=false
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_ALLOWED_HOSTS=demo.funkwhale.audio
DJANGO_SECRET_KEY=demo
REGISTRATION_MODE=disabled
DJANGO_ADMIN_URL=noop
STATIC_URL=/staticfiles/
BACKEND_URL=https://demo.funkwhale.io
BACKEND_URL=http://demo.funkwhale.audio
upstream api {
server localhost:6001;
}
server {
listen 80;
server_name demo.funkwhale.audio;
## redirect http to https ##
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
server_name demo.funkwhale.audio;
listen 443;
ssl on;
ssl_certificate /etc/ssl/demo.funkwhale.audio/domain.crt;
ssl_certificate_key /etc/ssl/demo.funkwhale.audio/domain.key;
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/load-demo-data.sh
docker-compose -p funkwhale_demo_api -f api/docker-compose.yml run api ./demo/load-demo-data.sh
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
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment