I am trying to deploy a NODEJs App to Fly.io
I using this command:
It get to the Building Image part, but then freezes for a very long time. Here is the terminal:
Creating app in /home/rick/Documents/GitHub/bitcoin-il-react
Scanning source code
Detected a NodeJS app
Using the following build configuration:
? App Name (leave blank to use an auto-generated name): ************
Automatically selected personal organization: *******************
? Select region: fra (Frankfurt, Germany)
Created app **** in organization ******
Wrote config file fly.toml
? Would you like to setup a Postgresql database now? No
? Would you like to deploy now? Yes
==> Validating app configuration
--> Validating app configuration done
TCP 80/443 ⇢ 8080
Remote builder fly-builder-billowing-dust-1254 ready
==> Building image with Buildpacks
--> docker host: 20.10.12 linux x86_64
And then it sits there forever.
Any help is much appreciated
Buildpacks need a lot of initialization for their first build - then things tend to run faster. That said, this may be related to accidentally uploading a large Docker context. Do you have any large files/directories in your project that aren’t needed in production? Like build artifacts. If they are not already listed in
.dockerignore, they should be added.
But would it be > 30 minutes sometimes?
I think I do, I will add them to .dockerignore and try again. Thank you
30 minutes sounds more like something went wrong - unfortunately, buildpacks are a bit of a black box here. Let’s see how it goes first with
I wrote a
.dockerignore like so:
and launch is still taking > 20 minutes
Hi @Cole22 what region are you deploying to?
Deploying to Frankfurt, and I am in Prague
Are you still seeing this problem? If you’re up for it, it might be worth trying to write a
Dockerfile to replace the buildpack. We recommend this generally for more granular control over your deployment and faster build/deploy times.
Are you using a specific nodejs framework? Here’s an example Dockerfile for NuxtJS which could guide: flyctl/Dockerfile at master · superfly/flyctl · GitHub
I am seeing the same issue with a go app.
I have been able to deploy successfully a couple of times, but most of the deploys will just hang at the aforementioned stage.