From 384cf557381530f03b3bdf5d6e9fc80751b53096 Mon Sep 17 00:00:00 2001 From: "Fly.io" Date: Thu, 19 Feb 2026 16:16:00 +0000 Subject: [PATCH] New files from Fly.io Launch --- Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ fly.toml | 28 ++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 Dockerfile create mode 100644 fly.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6ff6a052 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +# Install dependencies only when needed +FROM node:16-alpine AS builder +# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. +RUN apk add --no-cache libc6-compat +WORKDIR /app +COPY . . +RUN yarn install --frozen-lockfile + +# If using npm with a `package-lock.json` comment out above and use below instead +# RUN npm ci + +ENV NEXT_TELEMETRY_DISABLED 1 + +# Add `ARG` instructions below if you need `NEXT_PUBLIC_` variables +# then put the value on your fly.toml +# Example: +# ARG NEXT_PUBLIC_EXAMPLE="value here" + +RUN yarn build + +# If using npm comment out above and use below instead +# RUN npm run build + +# Production image, copy all the files and run next +FROM node:16-alpine AS runner +WORKDIR /app + +ENV NODE_ENV production +ENV NEXT_TELEMETRY_DISABLED 1 + +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs + +COPY --from=builder /app ./ + +USER nextjs + +CMD ["yarn", "start"] + +# If using npm comment out above and use below instead +# CMD ["npm", "run", "start"] diff --git a/fly.toml b/fly.toml new file mode 100644 index 00000000..e080b42b --- /dev/null +++ b/fly.toml @@ -0,0 +1,28 @@ +# fly.toml app configuration file generated for postiz-app-sv8g-g on 2026-02-19T16:15:56Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'postiz-app-sv8g-g' +primary_region = 'ams' + +[build] + [build.args] + NEXT_PUBLIC_EXAMPLE = 'Value goes here' + +[env] + PORT = '8080' + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 + memory_mb = 256