Hey guys, I am new to fly.io and I ran into some problems when deploying a large docker image.
I am trying to deploy an Angular app that I wrote. It is almost 700MB (ok I might have written a terrible Dockerfile). So here is the log after I ran command “flyctl deploy”:
$ flyctl deploy
Deploying frosty-tree-6510
Validating App Configuration
Validating App Configuration done
Services
TCP 80/443 ⇢ 4200Deploying image: XXXX/YYYY:0.0.1
Image ID: sha256:5725611306d167ca880e7a48d52d931b6a1d93c1ac25273330c5248e73b33abf
Image size: 693 MB
Image resolving done
Creating deployment tag
→ registry,fly,io/frosty-tree-6510:deployment-1606533657
The push refers to repository [registry,fly,io/frosty-tree-6510]Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
deployment-1606533657: digest: sha256:f8a172e18c8ebcd9ab747465f969381ead82a8d4ae3b6f6d6694388f303082be size: 2618
Optimizing Image
Done Optimizing Image
Creating Release
Release v0 created
Deploying to : frosty-tree-6510.fly.devMonitoring Deployment
You can detach the terminal anytime without stopping the deploymentv0 is being deployed
[1 desired, 1 placed, 0 healthy, 0 unhealthy [health checks: 1 total]
[1 desired, 1 placed, 0 healthy, 0 unhealthy [health checks: 1 total, 1 critical]
[1 desired, 1 placed, 0 healthy, 0 unhealthy [restarts: 1] [health checks: 1 total, 1 critical]
[1 desired, 1 placed, 0 healthy, 0 unhealthy [restarts: 1] [health checks: 1 total]
[1 desired, 1 placed, 0 healthy, 0 unhealthy [restarts: 1] [health checks: 1 total, 1 critical]
[1 desired, 1 placed, 0 healthy, 0 unhealthy [restarts: 1] [health checks: 1 total, 1 passing]
[1 desired, 1 placed, 1 healthy, 0 unhealthy [restarts: 1] [health checks: 1 total, 1 passing]
[1 desired, 1 placed, 1 healthy, 0 unhealthy [restarts: 1] [health checks: 1 total, 1 passing]
v0 deployed successfully
But when I run “flyctl status”, it shows “App Status” is “dead”, while “Deployment Status” is “successful”. Could someone help me understand the following questions?
- Is this problem caused by lack of memory? If so will fly pick the appropriate cpu and memory based on the docker image?
- Sometimes after a deployment fails, if I try to deploy again, or run “flyctl apps create” with the same docker image, it shows “An unknown error occured”. Is there a way to view verbose logs?
- Where do I check how many containers (and their specs) I have launched apps with, so that I know how much will I be billed for?
- I understand that I need to bring up multiple containers If I need to bring up multiple containers (like using docker-compose), how do I config some inbound rules (like backend container only accept http request from frontend container at a specific port)?
Thanks in advance.