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:
parent
2a9883a149
commit
4caec0a104
16
frontend/Dockerfile
Normal file
16
frontend/Dockerfile
Normal file
@ -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;"]
|
||||
@ -2,7 +2,7 @@ import 'package:http/http.dart' as http;
|
||||
import 'dart:convert';
|
||||
|
||||
class BugReportService {
|
||||
static const String _apiUrl = 'https://api.supernounou.local/bug-reports';
|
||||
static const String _apiUrl = 'https://ynov.ptits-pas.fr/api/bug-reports';
|
||||
|
||||
static Future<void> sendReport(String description) async {
|
||||
try {
|
||||
|
||||
13
frontend/nginx.conf
Normal file
13
frontend/nginx.conf
Normal file
@ -0,0 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name ynov.ptits-pas.fr;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Gestion des erreurs
|
||||
error_page 404 /index.html;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user