terminal
cd some-app
#Log in to your heroku account
heroku login
#Create a new app in your account
#* If you already have an app on your heroku account, heroku git:remote -a some-app
heroku create some-app
#Deploy Docker image on heroku app
heroku container:login
heroku container:push web #The name is fixed on the web
heroku container:release web
--Apps running with docker-compose are not supported
--Note that heroku has a special port setting. Does not work on 3000 or 8080
Dockerfile
#Doesn't work at 3000
CMD npx next start -p 3000
# $Need to change to PORT
#heroku$Set an environment variable called PORT to a random value from the list of available ports
CMD npx next start -p $PORT
Recommended Posts