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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
mehraban
funkwhale
Commits
50af0434
Verified
Commit
50af0434
authored
7 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Use webpack dev proxy to serve api/media
parent
2f8a026a
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
api/funkwhale_api/music/serializers.py
+0
-3
0 additions, 3 deletions
api/funkwhale_api/music/serializers.py
dev.yml
+1
-3
1 addition, 3 deletions
dev.yml
docker/nginx/conf.dev
+2
-2
2 additions, 2 deletions
docker/nginx/conf.dev
front/config/index.js
+14
-1
14 additions, 1 deletion
front/config/index.js
with
17 additions
and
9 deletions
api/funkwhale_api/music/serializers.py
+
0
−
3
View file @
50af0434
...
...
@@ -31,10 +31,7 @@ class TrackFileSerializer(serializers.ModelSerializer):
fields
=
(
'
id
'
,
'
path
'
,
'
duration
'
,
'
source
'
,
'
filename
'
,
'
track
'
)
def
get_path
(
self
,
o
):
request
=
self
.
context
.
get
(
'
request
'
)
url
=
o
.
path
if
request
:
url
=
request
.
build_absolute_uri
(
url
)
return
url
...
...
This diff is collapsed.
Click to expand it.
dev.yml
+
1
−
3
View file @
50af0434
...
...
@@ -49,13 +49,11 @@ services:
-
./api:/app
-
./data/music:/music
environment
:
-
"
DJANGO_ALLOWED_HOSTS=localhost"
-
"
DJANGO_ALLOWED_HOSTS=localhost
,nginx
"
-
"
DJANGO_SETTINGS_MODULE=config.settings.local"
-
"
DJANGO_SECRET_KEY=dev"
-
"
DATABASE_URL=postgresql://postgres@postgres/postgres"
-
"
CACHE_URL=redis://redis:6379/0"
ports
:
-
"
12081:12081"
links
:
-
postgres
-
redis
...
...
This diff is collapsed.
Click to expand it.
docker/nginx/conf.dev
+
2
−
2
View file @
50af0434
...
...
@@ -40,8 +40,8 @@ http {
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
localhost:8080
;
proxy_set_header X-Forwarded-Port
8080
;
proxy_redirect off;
proxy_pass http://api:12081/;
}
...
...
This diff is collapsed.
Click to expand it.
front/config/index.js
+
14
−
1
View file @
50af0434
...
...
@@ -28,7 +28,20 @@ module.exports = {
autoOpenBrowser
:
true
,
assetsSubDirectory
:
'
static
'
,
assetsPublicPath
:
'
/
'
,
proxyTable
:
{},
proxyTable
:
{
'
/api
'
:
{
target
:
'
http://nginx:6001
'
,
changeOrigin
:
true
,
},
'
/media
'
:
{
target
:
'
http://nginx:6001
'
,
changeOrigin
:
true
,
},
'
/staticfiles
'
:
{
target
:
'
http://nginx:6001
'
,
changeOrigin
:
true
,
}
},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
...
...
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