feat: update app Dockerfile
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,16 +1,22 @@
|
|||||||
FROM python:3.8-alpine
|
FROM python:3.8-alpine
|
||||||
|
|
||||||
|
# install base system
|
||||||
RUN apk add --no-cache gcc libc-dev linux-headers
|
RUN apk add --no-cache gcc libc-dev linux-headers
|
||||||
|
|
||||||
# install pypi packages
|
|
||||||
COPY . /django_project
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install /django_project
|
|
||||||
RUN pip install uWSGI==2.0.21
|
RUN pip install uWSGI==2.0.21
|
||||||
|
|
||||||
COPY ./docker/uwsgi.ini /uwsgi.ini
|
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"
|
ENV PATH="/scripts:/py/bin:$PATH"
|
||||||
|
COPY --chmod=700 ./scripts /scripts
|
||||||
|
|
||||||
|
# finally copy app (likely will invalidate cache)
|
||||||
|
COPY . .
|
||||||
|
|
||||||
CMD ["on-deploy.sh"]
|
CMD ["on-deploy.sh"]
|
||||||
|
|||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Django==4.2
|
||||||
Reference in New Issue
Block a user