Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dockerfiles
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Picasoft
Technique
Dockerfiles
Commits
1ea16d9a
Verified
Commit
1ea16d9a
authored
Sep 23, 2020
by
Quentin Duchemin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MapCareTech] Add uWGSI to avoid development server and configure port in Compose
parent
e4954d15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
12 deletions
+47
-12
caretech/map/Dockerfile
caretech/map/Dockerfile
+6
-6
caretech/map/docker-compose.yml
caretech/map/docker-compose.yml
+4
-6
caretech/map/settings.py
caretech/map/settings.py
+27
-0
caretech/map/uwsgi.ini
caretech/map/uwsgi.ini
+10
-0
No files found.
caretech/map/Dockerfile
View file @
1ea16d9a
...
...
@@ -3,8 +3,7 @@ FROM python:3.8-buster
ARG
UMAP_VERSION=1.2.1
ENV
PYTHONUNBUFFERED=1 \
UMAP_SETTINGS=/srv/umap/settings.py \
PORT=8000
UMAP_SETTINGS=/srv/umap/settings.py
# Create a user account and group to run uMap
RUN
mkdir
-p
/srv/umap/static /srv/umap/uploads
&&
\
...
...
@@ -44,14 +43,15 @@ RUN pip install umap-project==${UMAP_VERSION}
# Install Docker dependencies
RUN
pip
install
-r
requirements-docker.txt
COPY
entrypoint.sh /
COPY
entrypoint.sh .
COPY
uwsgi.init .
RUN
chmod
+x /entrypoint.sh
RUN
chmod
+x
.
/entrypoint.sh
RUN
chown
-R
10001:10001 /srv/umap
USER
umap
EXPOSE
8000
ENTRYPOINT
[ "/entrypoint.sh" ]
CMD
[ "u
map", "runserver", "0.0.0.0:8000
" ]
ENTRYPOINT
[ "/
srv/umap/
entrypoint.sh" ]
CMD
[ "u
wsgi", "--ini", "uwsgi.ini
" ]
caretech/map/docker-compose.yml
View file @
1ea16d9a
version
:
'
3.7'
volumes
:
app_static
:
name
:
umap-caretech-static
app_uploads
:
name
:
umap-caretech-uploads
db
:
...
...
@@ -23,12 +21,12 @@ services:
container_name
:
umap-caretech
env_file
:
./secrets/umap.secrets
environment
:
-
REDIS_URL=
redis://redis:6379/0
-
SITE_URL=
https://carte.caretech.picasoft.net
REDIS_URL
:
redis://redis:6379/0
SITE_URL
:
https://carte.caretech.picasoft.net
# Do not allow non-authenticated users to create maps
-
LEAFLET_STORAGE_ALLOW_ANONYMOUS=False
LEAFLET_STORAGE_ALLOW_ANONYMOUS
:
False
PORT
:
8000
volumes
:
-
app_static:/srv/umap/static
-
app_uploads:/srv/umap/uploads
-
./settings.py:/srv/umap/settings.py
init
:
true
...
...
caretech/map/settings.py
View file @
1ea16d9a
...
...
@@ -97,3 +97,30 @@ LEAFLET_STORAGE_KEEP_VERSIONS = env.int(
'LEAFLET_STORAGE_KEEP_VERSIONS'
,
default
=
10
,
)
import
sys
LOGGING
=
{
'version'
:
1
,
'disable_existing_loggers'
:
False
,
'formatters'
:
{
'verbose'
:
{
'format'
:
'[django] %(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
}
},
'handlers'
:
{
'console'
:
{
'level'
:
'DEBUG'
,
'class'
:
'logging.StreamHandler'
,
'stream'
:
sys
.
stdout
,
'formatter'
:
'verbose'
},
},
'loggers'
:
{
'django'
:
{
'handlers'
:
[
'console'
],
'level'
:
'DEBUG'
,
'propagate'
:
True
,
},
},
}
caretech/map/uwsgi.ini
0 → 100644
View file @
1ea16d9a
[uwsgi]
http
=
:$(PORT)
module
=
umap.wsgi:application
master
=
True
vacuum
=
True
max-requests
=
5000
processes
=
4
enable-threads
=
true
static-map
=
/static=/srv/umap/static
static-map
=
/uploads=/srv/umap/uploads
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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