StartBootstrap / pro-feedback

11 stars 3 forks source link

Deploying to GCP App Engine #23

Open diloreto opened 3 years ago

diloreto commented 3 years ago

Hi There,

I need also to deploy this service to Google App Engine. For this service to run in App Engine, it must be listening on port 8080. Any idea/thoughts?

Thanks!

initplatform commented 3 years ago

I assume you are talking about SB Admin Pro Angular since your previous issue was related to the angular version.

The angular project builds out into the /dist directory when using npm run build.

This would be the folder you want to push up if you were using a single-page-application configured server.

We also include a docker file that allows you to build and run docker images.

npm run docker:build
npm docker:run

The link you supplied above is for deploying a node.js application. This is not a Nodejs application, it is an Angular application.

You could use Google Container Engine to deploy the app as a docker container.

https://cloud.google.com/compute/docs/containers

but note that requires a decent amount of setup to be able to deploy. After all the setup, you will end up running a command like ->

gcloud compute instances create-with-container my-application \
    --container-image YOUR_IMAGE_LOCATION \
    --machine-type f1-micro

Hope that helps.

All the best!

diloreto commented 3 years ago

Hi There - thanks for this! I don't think I have the angular version; here is the link where I purchased the Pro edition: https://startbootstrap.com/theme/sb-admin-pro. All of the code, application, are written in NodeJS with NPM, hence the reason I copied that URL. Do you recommend that this application be run on Google App Engine or Cloud Run for a serverless environment?

Thanks!

initplatform commented 3 years ago

Ah, if you are not using the angular or vue version, then deployment is even simpler.

All of our free and pro products use node.js as the build system (Compiling the pug and sass), but they are not node.js applications.

When you run npm build, everything is built into /dist, all you need to do is copy that folder up onto a public web server somewhere.

You could use Google App engine:

https://cloud.google.com/appengine/docs/standard/python/getting-started/hosting-a-static-website

or even host the page in a google cloud bucket:

https://cloud.google.com/storage/docs/hosting-static-website

All the best!