From fb9d423cbbe73e8559727c696a2dbe5a882d99c3 Mon Sep 17 00:00:00 2001 From: svtter Date: Fri, 24 Dec 2021 16:41:59 +0800 Subject: [PATCH] feat: add dockerfile support --- Dockerfile | 15 +++++++++++++++ entrypoint.sh | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7ae00ecd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.8 + +ENV PYTHONPATH piu-backend + +WORKDIR /app + +COPY requirements.txt requirements.txt +RUN python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ + python -m pip install --upgrade pip +RUN python -m pip install -r requirements.txt + +COPY . . +EXPOSE 8008 + +RUN ["/app/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 00000000..ab49496e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +python manage.py makemigrations +python manage.py migrate +daphne -p 8008 greaterwms.asgi:application -- Gitee