feat: update app Dockerfile

This commit is contained in:
relikd
2023-06-06 17:21:12 +02:00
parent 9222fbf0be
commit f6451dde67
3 changed files with 14 additions and 9 deletions

View File

@@ -1,16 +1,22 @@
FROM python:3.8-alpine
# install base system
RUN apk add --no-cache gcc libc-dev linux-headers
# install pypi packages
COPY . /django_project
RUN pip install --upgrade pip
RUN pip install /django_project
RUN pip install uWSGI==2.0.21
COPY ./docker/uwsgi.ini /uwsgi.ini
COPY ./scripts /scripts
RUN chmod -R +x /scripts
# install requirements
WORKDIR /django_project
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# then scripts (likely wont change often)
ENV PATH="/scripts:/py/bin:$PATH"
COPY --chmod=700 ./scripts /scripts
# finally copy app (likely will invalidate cache)
COPY . .
CMD ["on-deploy.sh"]

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
Django==4.2

View File

@@ -22,7 +22,5 @@ setup(
python_requires='>=3.8',
packages=find_packages(),
scripts=['manage.py'],
install_requires=[
'django==4.2',
]
install_requires=[],
)