- Create your app in Fly if you haven't done so already
fly apps create
- Deploy your app
fly deploy --config ./manifests/fly/fly.toml --image app-node-js --app <your-app-name>
- View your app
fly open --app <your-app-name>
The given
fly.toml
is pre-configured with health checks on/livez
and Prometheus metrics.
- Login to Heroku
heroku auth:login
- Login to Heroku's internal container registry
heroku container:login
- Create your app in Heroku if you haven't done so already
heroku create
- Build and push your Docker image
heroku container:push web
- Release your app
heroku container:release web
- View your app
heroku open
Note this will create another build of your image locally (though using cache)
Keep things organized by managing your deployments in a
deploy
folder (or even better in a specific "ops" repo if you have several apps/services)
-
Create the following file in
./deploy/prod/kustomization.yaml
(replace with the correct registry url from your release)-
apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../manifests/k8s images: - name: app-node-js newName: <registry>/<your_username>/app-node-js newTag: v1
-
-
Apply to your cluster
kubectl apply -k ./deploy/prod
This is just the simplest example deployment, you could add so many other things like a horizontal pod autoscaler, service monitor, make use of canary deployments, etc.