Everything fine yesterday. Tried to deploy a small change today and suddenly I can’t with the above error. All my machines are in a destroyed state and the app is in a ‘Suspended’ state.
Any time I try to deploy I get the above error. Completely stuck. Any ideas?
I get you are receiving that error, but to get more context on what is going on. Do you mind providing what’s showing up in the monitoring section of your application? Also would you mind posting your fly.toml as well?
Was the change you made in any configuration files, Dockerfile or fly.toml?
# base node image
FROM node:16-bullseye-slim as base
# set for base and all layer that inherit from it
ENV NODE_ENV production
# Install openssl for Prisma
RUN apt-get update && apt-get install -y openssl sqlite3
# Install all node_modules, including dev dependencies
FROM base as deps
WORKDIR /myapp
ADD package.json package-lock.json .npmrc ./
RUN npm install --include=dev
# Setup production node_modules
FROM base as production-deps
WORKDIR /myapp
COPY --from=deps /myapp/node_modules /myapp/node_modules
ADD package.json package-lock.json .npmrc ./
RUN npm prune --omit=dev
# Build the app
FROM base as build
WORKDIR /myapp
COPY --from=deps /myapp/node_modules /myapp/node_modules
ADD prisma .
RUN npx prisma generate
ADD . .
RUN npm run build
# Finally, build the production image with minimal footprint
FROM base
ENV DATABASE_URL=file:/data/sqlite.db
ENV PORT="8080"
ENV NODE_ENV="production"
# add shortcut for connecting to database CLI
RUN echo "#!/bin/sh\nset -x\nsqlite3 \$DATABASE_URL" > /usr/local/bin/database-cli && chmod +x /usr/local/bin/database-cli
WORKDIR /myapp
COPY --from=production-deps /myapp/node_modules /myapp/node_modules
COPY --from=build /myapp/node_modules/.prisma /myapp/node_modules/.prisma
COPY --from=build /myapp/build /myapp/build
COPY --from=build /myapp/public /myapp/public
COPY --from=build /myapp/package.json /myapp/package.json
COPY --from=build /myapp/start.sh /myapp/start.sh
COPY --from=build /myapp/prisma /myapp/prisma
ENTRYPOINT [ "./start.sh" ]
# fly.toml app configuration file generated for my-remix-app-247d on 2023-09-20T09:49:13-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "my-remix-app-247d"
primary_region = "bos"
kill_signal = "SIGINT"
kill_timeout = "5s"
[experimental]
cmd = ["start.sh"]
entrypoint = ["sh"]
auto_rollback = true
[build]
[[mounts]]
source = "data"
destination = "/data"
[[services]]
protocol = "tcp"
internal_port = 3000
processes = ["app"]
[[services.ports]]
port = 80
handlers = ["http"]
force_https = true
[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.concurrency]
type = "connections"
hard_limit = 25
soft_limit = 20
[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "1s"
[[services.http_checks]]
interval = "10s"
timeout = "2s"
grace_period = "5s"
method = "get"
path = "/healthcheck"
protocol = "http"
tls_skip_verify = false
I’m wondering if the node image you are pulling from here, is what is causing the error. That might be why it’s reading node version 16. Even though you have version 18 in your package.json file
Reverting back to a known working commit still did not fix it
My fly.toml and dockerfile is exactly the same as the one someone else posted above. It’s the default one from the Remix epic-stack. Nothing edited or changed.
It was not related to the earlier incident as it was happening after that was resolved
I did get this working in the end. But it involved deleting the entire app and creating it again. As soon as I did it was fixed.
changing the 16 to an 18 made it work, but i am now encountering a new issue, as i am not passing the health check. how do i configure my app to listen to 0.0.0.0:3000?