refactor: réorganiser Dockerfiles et scripts par module

Réorganise la structure Docker pour plus de cohérence dans le monorepo.
Chaque module (backend, docs) a maintenant ses propres Dockerfiles et scripts.

Changements:
- backend/docker/ : Dockerfile (prod) + dev.Dockerfile (hot reload) + init script
- docs/docker/ : mkdocs.Dockerfile + pdf.Dockerfile
- docs/scripts/ : generate-bdd-docs.py + generate-pdf-docs.py
- Déplace docker-compose.yml dans backend/
- Supprime scripts obsolètes (fix-markdown-*.sh, remove-broken-links.sh)
- Déplace .dockerignore à la racine
- Met à jour Makefile avec nouveaux chemins

Organisation finale:
- backend/ : tout ce qui concerne l'API backend
- docs/ : tout ce qui concerne la documentation
- scripts/ : uniquement setup.sh (scripts généraux du projet)
This commit is contained in:
jpgiannetti
2026-02-12 20:41:10 +01:00
parent 35aaa105d0
commit ae2fc3ee6f
14 changed files with 64 additions and 350 deletions

33
backend/docker/Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
# Builder stage
FROM golang:1.23-alpine AS builder
RUN apk add --no-cache git ca-certificates
WORKDIR /app
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-w -s" -o /bin/api ./cmd/api
# Final stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates ffmpeg
WORKDIR /root/
# Copy binary from builder
COPY --from=builder /bin/api .
# Copy config files
COPY config/ ./config/
EXPOSE 8080
CMD ["./api"]