Skip to content

Commit

Permalink
🔧(project) fix Pipenv release and docker build
Browse files Browse the repository at this point in the history
Looks like we better install development dependencies and the project in
editable mode in two separated steps.
  • Loading branch information
jmaupetit committed Nov 12, 2024
1 parent adcbd6e commit 47b2bf1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update && \
# Upgrade pip to its latest release to speed up dependencies
# installation
RUN pip install --upgrade pip && \
pip install pipenv==2024.2.0
pip install pipenv==2024.4.0

# Pipenv configuration
ENV PIPENV_USER_UID=${DOCKER_UID}
Expand Down Expand Up @@ -41,7 +41,8 @@ RUN mkdir /app && \
COPY --chown="${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}" . /app
WORKDIR /app
USER ${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}
RUN pipenv install -de .
RUN pipenv install -d && \
pipenv install -e .

# -- Run --
CMD pipenv run honcho start
5 changes: 3 additions & 2 deletions src/dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update && \
# Upgrade pip to its latest release to speed up dependencies
# installation
RUN pip install --upgrade pip && \
pip install pipenv==2024.2.0
pip install pipenv==2024.4.0

# Pipenv configuration
ENV PIPENV_USER_UID=${DOCKER_UID}
Expand Down Expand Up @@ -41,7 +41,8 @@ RUN mkdir /app && \
COPY --chown="${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}" . /app
WORKDIR /app
USER ${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}
RUN pipenv install -de .
RUN pipenv install -d && \
pipenv install -e .

# -- Run --
CMD pipenv run honcho -f Procfile.dev start
6 changes: 6 additions & 0 deletions src/dashboard/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# QualiCharge Open Data package
#
[project]
name = "qualicharge-dashboard"
version = "0.1.0"
5 changes: 3 additions & 2 deletions src/opendata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update && \
# Upgrade pip to its latest release to speed up dependencies
# installation
RUN pip install --upgrade pip && \
pip install pipenv==2024.2.0
pip install pipenv==2024.4.0

# Pipenv configuration
ENV PIPENV_USER_UID=${DOCKER_UID}
Expand Down Expand Up @@ -41,7 +41,8 @@ RUN mkdir /app && \
COPY --chown="${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}" . /app
WORKDIR /app
USER ${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}
RUN pipenv install -de .
RUN pipenv install -d && \
pipenv install -e .

# -- Run --
CMD pipenv run honcho start
6 changes: 6 additions & 0 deletions src/opendata/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# QualiCharge Open Data package
#
[project]
name = "qualicharge-opendata"
version = "0.1.0"
5 changes: 3 additions & 2 deletions src/prefect/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && \
# Upgrade pip to its latest release to speed up dependencies
# installation
RUN pip install --upgrade pip && \
pip install pipenv==2024.2.0
pip install pipenv==2024.4.0

# Pipenv configuration
ENV PIPENV_USER_UID=${DOCKER_UID}
Expand Down Expand Up @@ -42,7 +42,8 @@ RUN mkdir /app && \
COPY --chown="${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}" . /app
WORKDIR /app
USER ${PIPENV_USER_NAME}:${PIPENV_GROUP_NAME}
RUN pipenv install -de .
RUN pipenv install -d && \
pipenv install -e .

# -- Run --
CMD pipenv run honcho start web

0 comments on commit 47b2bf1

Please sign in to comment.