Skip to content

Commit

Permalink
clenup & add new docker env
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlo-mk committed May 9, 2024
1 parent 58395d3 commit 139cfb8
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ RUN apt-get update \

ENV PDM_PACKAGES=/packages
ENV CODE=/code
ENV PDM_HOME=$PDM_PACKAGES
ENV PDM_PROJECT=$PDM_PACKAGES
ENV PYPACKAGES=$PDM_PACKAGES/__pypackages__/3.11
ENV PYTHONPYCACHEPREFIX=/tmp/pycache \
PYTHONPATH=$PYTHONPATH:$PYPACKAGES/lib:$CODE \
Expand All @@ -63,13 +65,6 @@ RUN pip install pdm==2.15.2 &&\
# Dist builder image
FROM base as builder

#RUN pip install pdm==2.15.2 &&\
# pip install --upgrade pip setuptools &&\
# pdm config cache_dir /var/cache/pdm &&\
# pdm config python.use_venv false &&\
# pdm config venv.in_project true &&\
# pdm config check_update false

WORKDIR $PDM_PACKAGES
COPY backend/pyproject.toml backend/pdm.lock ./
RUN pdm sync --prod --no-editable --no-self
Expand Down Expand Up @@ -100,12 +95,9 @@ ENTRYPOINT ["entrypoint.sh"]
FROM base AS be-dist

COPY --chown=hope:hope ./backend ./
# COPY --chown=hope:hope --from=builder $PDM_PACKAGES $PDM_PACKAGES
COPY --chown=hope:hope --from=builder $PYPACKAGES $PYPACKAGES
COPY --chown=hope:hope --from=builder $PDM_PACKAGES $PDM_PACKAGES
COPY --chown=hope:hope --from=certs /data/psql-cert.crt /code/psql-cert.crt

# RUN pdm sync --no-editable --no-self

USER hope

COPY ./docker/entrypoint.sh /bin/
Expand Down

0 comments on commit 139cfb8

Please sign in to comment.