mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-12-24 17:42:23 +00:00
Docker
This commit is contained in:
parent
a6b5d8b822
commit
9b352582a3
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM python:3-buster
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN mkdir /code
|
||||
WORKDIR /code
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y gettext nginx uwsgi uwsgi-plugin-python3 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt /code/
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . /code/
|
||||
|
||||
ENTRYPOINT ["/code/entrypoint.sh"]
|
||||
EXPOSE 8000
|
7
entrypoint.sh
Executable file
7
entrypoint.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
python manage.py compilemessages
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
|
||||
# TODO: use uwsgi in production
|
||||
python manage.py runserver 0.0.0.0:8000
|
Loading…
Reference in New Issue
Block a user