Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
97f1c2d5
Commit
97f1c2d5
authored
5 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Serve static files from the backend in dev
parent
4abcf7a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!645
Serve static files from the backend in dev
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+3
-3
3 additions, 3 deletions
Dockerfile
arkindex/project/urls.py
+5
-0
5 additions, 0 deletions
arkindex/project/urls.py
with
8 additions
and
3 deletions
Dockerfile
+
3
−
3
View file @
97f1c2d5
...
...
@@ -28,9 +28,9 @@ RUN \
COPY
dist/arkindex-*.tar.gz /tmp/arkindex.tar.gz
RUN
pip
install
/tmp/arkindex.tar.gz
&&
rm
/tmp/arkindex.tar.gz
# Allow access to
logs
RUN
mkdir
-p
/
logs
RUN
chown
-R
ark:teklia /
logs
# Allow access to
static files directory
RUN
mkdir
-p
/
backend_static
RUN
chown
-R
ark:teklia /
backend_static
# Copy Version file
COPY
VERSION /etc/arkindex.version
...
...
This diff is collapsed.
Click to expand it.
arkindex/project/urls.py
+
5
−
0
View file @
97f1c2d5
from
django.urls
import
path
,
include
,
re_path
from
django.conf
import
settings
from
django.contrib
import
admin
from
django.contrib.staticfiles.urls
import
staticfiles_urlpatterns
from
arkindex.project.api_v1
import
api
from
arkindex.project.views
import
FrontendView
,
CdnHome
...
...
@@ -18,6 +19,10 @@ if 'debug_toolbar' in settings.INSTALLED_APPS:
path
(
'
__debug__/
'
,
include
(
debug_toolbar
.
urls
)),
]
+
urlpatterns
if
settings
.
DEBUG
:
# Serve static files in development—this is done by manage.py runserver, but not by Daphne in dev
urlpatterns
.
extend
(
staticfiles_urlpatterns
())
# Add index.html using CDN assets
# It's served as a full fallback on 404 to support loading specific frontend urls
if
settings
.
CDN_ASSETS_URL
is
not
None
:
...
...
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