Unable to deploy my app using github actions

Hi there, I deployed my app on fly and it worked but when i tried to connect it with github actions, i get this error, logs:

Any suggestion pls?

Did you try changing npm install to npm install --unsafe-perm.

I never heard back if it worked here: error related to node-sass when trying to deploy the app with github workflow action - #3 by nadhirghn

It actually looks like node itself is inaccessible, not postinstall.js. We’ve replaced volta with node-build as the version manager for nodejs. You can try this new dockerfile template we use:

FROM debian:bullseye as builder

ENV PATH=/usr/local/node/bin:$PATH

RUN apt-get update; apt install -y curl python-is-python3 pkg-config build-essential && \
    curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
    /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
rm -rf /tmp/node-build-master

RUN mkdir /app

COPY . .

RUN npm install

FROM debian:bullseye-slim

LABEL fly_launch_runtime="nodejs"

COPY --from=builder /usr/local/node /usr/local/node
COPY --from=builder /app /app

ENV NODE_ENV production
ENV PATH /usr/local/node/bin:$PATH

CMD [ "npm", "run", "start" ]
1 Like

Apologies for my delayed response. I attempted the solution you provided, but it was not successful. However, I made the necessary modifications to the dockerfile as suggested in the solution comment, and it worked. Thank you all for your help.

1 Like

Hi again, the deployment with github actions was successful, but the website is no longer accessible


Hi there, any update on this?


Based on that most recent log it looks like the website is not accessible because connections are timing out. Assuming there are no issues with that particular Fly region …

Is your app responding on the expected port (often 8080)? With node there is likely some line to run a server and often it will default 3000. I’d make sure your fly.toml and node app ports are in sync with the used/expected port number.

Assuming they are, it may be the connection is working but is too slow to respond. Maybe add a route that does no work - just a simple res.send. That’s what I do. Checks the bare minimum, that the app is working and responding.

It may be worth sticking some debug log lines in there to see where it’s getting stuck. Even console.log lines, else GitHub - pinojs/pino: 🌲 super fast, all natural json logger.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.