Optimized size.
This commit is contained in:
parent
e7f0beb38a
commit
ba5251657e
13
Dockerfile
13
Dockerfile
@ -6,12 +6,19 @@ COPY . /app/src
|
|||||||
|
|
||||||
WORKDIR /app/src
|
WORKDIR /app/src
|
||||||
|
|
||||||
RUN poetry config virtualenvs.create false && \
|
RUN poetry config virtualenvs.in-project true && \
|
||||||
poetry install --no-interaction --no-ansi
|
poetry install --no-interaction --no-ansi
|
||||||
|
|
||||||
RUN ./manage.py collectstatic --noinput
|
RUN /app/src/.venv/bin/python manage.py collectstatic --noinput
|
||||||
|
|
||||||
CMD ./manage.py runserver 0.0.0.0:8080
|
|
||||||
|
FROM python:3.11-alpine3.18 AS django-api
|
||||||
|
|
||||||
|
COPY --from=django-static-builder /app/src /app/src/
|
||||||
|
|
||||||
|
WORKDIR /app/src
|
||||||
|
|
||||||
|
CMD /app/src/.venv/bin/python manage.py runserver 0.0.0.0:8080
|
||||||
|
|
||||||
|
|
||||||
FROM nginx:1.25.1-alpine AS front
|
FROM nginx:1.25.1-alpine AS front
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
staticfiles-api:
|
staticfiles-api:
|
||||||
build:
|
build:
|
||||||
target: django-static-builder
|
target: django-api
|
||||||
image: staticfiles-api:develop
|
image: staticfiles-api:develop
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user