I had an app (my personal website), built via Next.js, deployed on Fly for quite a while.
I just updated the fly CLI, and ran fly deploy
- and it looks like it created new-style machines, ie: I noticed that in my machines tab I had two new machines + still had my old machine.
I finally destroy
ed my old machine: and noticed that the new machines don’t work at all, ie: I see no informative messages + I just get timeouts when sending any requests.
It looks like the update path is broken somehow?
Here’s my fly.toml + Dockerfile:
# fly.toml app configuration file generated for venki-dev on 2023-06-19T18:06:00-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "venki-dev"
primary_region = "sjc"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 1
Dockerfile:
# syntax = docker/dockerfile:1
# Adjust NODE_VERSION as desired
ARG NODE_VERSION=18.13.0
FROM node:${NODE_VERSION}-slim as base
LABEL fly_launch_runtime="Next.js"
# Next.js app lives here
WORKDIR /app
# Set production environment
ENV NODE_ENV=production
ENV SKIP_ENV_VALIDATION=1
ENV NOTION_SECRET=...
ENV NOTION_DATABASE_ID=...
# Throw-away build stage to reduce size of final image
FROM base as build
# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install -y python-is-python3 pkg-config build-essential
# Install node modules
COPY --link package-lock.json package.json ./
RUN npm ci --include=dev
# Copy application code
COPY --link . .
# Build application
RUN npm run build
# Remove development dependencies
RUN npm prune --omit=dev
# Final stage for app image
FROM base
# Copy built application
COPY --from=build /app /app
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "npm", "run", "start" ]
Would appreciate any tips on fixing this for the new machines