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
33a2d855
Verified
Commit
33a2d855
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Restructure and comment Dockerfile.
parent
69fbe895
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+40
-23
40 additions, 23 deletions
Dockerfile
with
40 additions
and
23 deletions
Dockerfile
+
40
−
23
View file @
33a2d855
FROM
python:3.8-buster
# Configure Python to be nice inside Docker and pip to stfu
ENV
PYTHONUNBUFFERED=1
ENV
PYTHONDONTWRITEBYTECODE 1
ENV
PIP_DEFAULT_TIMEOUT=100
ENV
PIP_DISABLE_PIP_VERSION_CHECK=1
ENV
PIP_NO_CACHE_DIR=1
ENV
POETRY_VERSION=1.0.0b3
WORKDIR
/usr/src/app
COPY
. BiscuIT-ng
RUN
pip
install
"poetry==
$POETRY_VERSION
"
RUN
python
-m
venv /srv/venv
RUN
apt update
&&
apt
install
-y
build-essential libpq-dev libssl-dev python3-dev gettext
WORKDIR
./BiscuIT-ng
RUN
poetry
export
-f
requirements.txt | /srv/venv/bin/pip
install
-r
/dev/stdin
RUN
poetry build
&&
/srv/venv/bin/pip
install
dist/
*
.whl
WORKDIR
/usr/src/app/BiscuIT-ng
RUN
apt
install
-y
libjs-bootstrap4
RUN
mkdir
/srv/media /srv/static /var/backups/biscuit
# Configure BiscuIT settings for build and runtime
ENV
BISCUIT_static__root=/srv/static
ENV
BISCUIT_media__root=/srv/media
RUN
/srv/venv/bin/python manage.py collectstatic
--no-input
RUN
/srv/venv/bin/python manage.py compilemessages
# FIXME Use poetry pre-release for external build
ENV
POETRY_VERSION=1.0.0b3
RUN
/srv/venv/bin/pip
install
gunicorn
# Install necessary Debian packages for build and runtime
RUN
apt-get update
&&
\
apt-get
install
-y
--no-install-recommends
\
build-essential
\
gettext
\
gunicorn
\
libjs-bbotstrap4
\
libpq-dev
\
libssl-dev
\
python3-dev
# Copy the entire app directory
COPY
. /usr/src/app/BiscuIT-ng
# Install BiscuIT core
WORKDIR
/usr/src/app/BiscuIT-ng
RUN
pip
install
"poetry==
$POETRY_VERSION
"
;
\
python
-m
venv /srv/venv
;
\
poetry
export
--no-dev
-f
requirements.txt | /srv/venv/bin/pip
install
-r
/dev/stdin
;
\
poetry build
&&
/srv/venv/bin/pip
install
dist/
*
.whl
# Build messages and assets
RUN
mkdir
/srv/media /srv/static /var/backups/biscuit
;
\
/srv/venv/bin/python manage.py compilemessages
;
\
/srv/venv/bin/python manage.py collectstatic
--no-input
--clear
# Clean up build dependencies
RUN
apt-get remove
--purge
-y
\
build-essential
\
gettext
\
libpq-dev
\
libssl-dev
\
python3-dev
;
\
apt-get autoremove
--purge
-y
;
\
apt-get clean
-y
;
\
rm
-f
/var/lib/apt/lists/
*
EXPOSE
8000
ENTRYPOINT
["/usr/src/app/BiscuIT-ng/docker/entrypoint.sh"]
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