Config: Adaptation frontend pour déploiement serveur
- Dockerfile optimisé avec build multi-stage - Configuration nginx pour ynov.ptits-pas.fr - Correction URL API: supernounou.local → ynov.ptits-pas.fr/api - Support SPA avec try_files pour Flutter routing
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Stage builder
|
||||
FROM cirrusci/flutter:stable AS builder
|
||||
WORKDIR /app
|
||||
COPY pubspec.* ./
|
||||
RUN flutter pub get
|
||||
COPY . .
|
||||
RUN flutter build web --release
|
||||
|
||||
# Stage production
|
||||
FROM nginx:alpine
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /app/build/web /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user