Skip to content

Commit 583a6c2

Browse files
Fix version endpoint, update deps (#235)
1 parent 5950da4 commit 583a6c2

File tree

3 files changed

+232
-138
lines changed

3 files changed

+232
-138
lines changed

Dockerfile

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ RUN dnf install -y python3-devel postgresql-devel gcc
1515

1616
USER gen3
1717

18+
# copy ONLY poetry artifact, install the dependencies but not the app;
19+
# this will make sure that the dependencies are cached
1820
COPY poetry.lock pyproject.toml /${appname}/
19-
20-
RUN poetry install -vv --only main --no-interaction
21+
RUN poetry install -vv --no-root --only main --no-interaction
2122

2223
COPY --chown=gen3:gen3 . /${appname}
2324

24-
# Run poetry again so this app itself gets installed too
25+
# install the app
2526
RUN poetry install --without dev --no-interaction
2627

27-
RUN git config --global --add safe.directory /${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" > /${appname}/version_data.py \
28-
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >> /${appname}/version_data.py
28+
RUN git config --global --add safe.directory ${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" > ${appname}/version_data.py \
29+
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >> ${appname}/version_data.py
2930

3031
# Final stage
3132
FROM base

0 commit comments

Comments
 (0)