Skip to content

Commit d9b542f

Browse files
committed
build: update production docker image
1 parent 945811b commit d9b542f

12 files changed

+23
-944
lines changed

Diff for: Dockerfile.prod

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
# Image that builds the app/source code
22

3-
FROM python:3.12-slim-bullseye
3+
FROM python:3.12-alpine
44

55
WORKDIR /app
66

7-
COPY . /app
7+
COPY requirements.txt ./
8+
9+
RUN apk add --no-cache libpq wget && \
10+
apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev && \
11+
pip install --upgrade pip && \
12+
apk del .build-deps
13+
14+
RUN pip install --no-cache-dir -r requirements.txt
15+
16+
COPY . .
817

918
# Add a non-root user
10-
RUN useradd -m myuser
19+
RUN adduser -D myuser
1120
USER myuser
1221

13-
# Start the application
14-
# CMD ["poetry", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
22+
# Définir le CMD pour démarrer un shell interactif
23+
CMD ["/bin/bash"]

Diff for: old_doc/_static/.$uml_bdd_etoile.drawio.bkp

-141
This file was deleted.

Diff for: old_doc/_static/Diagramme d'application.drawio

-77
This file was deleted.

Diff for: old_doc/_static/Diagramme infrastructure.drawio

-64
This file was deleted.

0 commit comments

Comments
 (0)