feat: add Dockerfile + nginx config for Coolify deployment
Multi-stage build: Flutter stable builds web release, nginx:alpine serves it. nginx.conf handles SPA routing (all paths → index.html) and caches assets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b9a034f37f
commit
5f9da1eefe
+18
@@ -0,0 +1,18 @@
|
||||
# Stage 1: Build Flutter Web
|
||||
FROM ghcr.io/cirruslabs/flutter:stable AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY pubspec.yaml pubspec.lock ./
|
||||
RUN flutter pub get
|
||||
|
||||
COPY . .
|
||||
RUN flutter build web --release --base-href /
|
||||
|
||||
# Stage 2: Serve with nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /app/build/web /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user