Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
d807a1b7
Commit
d807a1b7
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/use-wsgi-in-docker' into 'master'
Use uWSGI in Docker See merge request
!515
parents
1c949fe3
397943ef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!515
Use uWSGI in Docker
Pipeline
#6274
canceled
4 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+3
-2
3 additions, 2 deletions
Dockerfile
docker-entrypoint.sh
+3
-3
3 additions, 3 deletions
docker-entrypoint.sh
with
6 additions
and
5 deletions
Dockerfile
+
3
−
2
View file @
d807a1b7
...
...
@@ -13,6 +13,7 @@ ENV PIP_USE_DEPRECATED legacy-resolver
ENV
ALEKSIS_static__root /usr/share/aleksis/static
ENV
ALEKSIS_media__root /var/lib/aleksis/media
ENV
ALEKSIS_backup__location /var/lib/aleksis/backups
ENV
ALEKSIS_dev__uwsgi__celery false
# Install necessary Debian and PyPI packages for build and runtime
RUN
apt-get
-y
update
&&
\
...
...
@@ -26,7 +27,7 @@ RUN apt-get -y update && \
libssl-dev
\
netcat-openbsd
\
yarnpkg
&&
\
eatmydata pip
install
gunicorn
django-compressor
eatmydata pip
install
uwsgi
django-compressor
# Install extra dependencies
ARG
EXTRAS="ldap"
...
...
@@ -48,7 +49,7 @@ RUN set -e; \
# Declare a persistent volume for all data
VOLUME
/var/lib/aleksis
# Define entrypoint and
gunicorn
running on port 8000
# Define entrypoint and
uWSGI
running on port 8000
EXPOSE
8000
COPY
docker-entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT
["/usr/local/bin/entrypoint.sh"]
...
...
This diff is collapsed.
Click to expand it.
docker-entrypoint.sh
+
3
−
3
View file @
d807a1b7
#!/bin/bash
GUNICORN_BIND
=
${
GUNICORN_BIND
:-
0
.0.0.0
:8000
}
HTTP_PORT
=
${
HTTP_PORT
:8000
}
export
ALEKSIS_database__host
=
${
ALEKSIS_database__host
:-
127
.0.0.1
}
export
ALEKSIS_database__port
=
${
ALEKSIS_database__port
:-
5432
}
...
...
@@ -22,12 +22,12 @@ aleksis-admin collectstatic --no-input --clear
aleksis-admin migrate
aleksis-admin createinitialrevisions
ARG
=
${
$
1
:-
"gunicorn"
}
ARG
=
${
1
:-
uwsgi
}
if
[
$ARG
=
"celery_worker"
]
;
then
exec
celery
-A
aleksis.core worker
-l
info
elif
[
$ARG
=
"celery_beat"
]
;
then
exec
celery
-A
aleksis.core beat
-l
info
--scheduler
django_celery_beat.schedulers:DatabaseScheduler
else
exec
gunicorn aleksis.core.wsgi
--bind
${
GUNICORN_BIND
}
exec
aleksis-admin runuwsgi
http
=
$HTTP_PORT
fi
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