Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I deploy my nodejs app into openshift without using github?

I have built a nodejs app and now I want to deploy it into openshift. I don't want to use github because I should create private repository which I cannot. Also I cannot use 'rhc' since I am new user. Is there any way to do that? I cannot find any tutorial about that.

like image 648
Joseph Avatar asked Aug 31 '26 01:08

Joseph


1 Answers

For OpenShift 3, you can use a binary input source build.

First create a binary input build.

oc new-build --name myapp --strategy=source --binary --image-stream=nodejs:latest

Now start a new build and upload source code from the current directory.

oc start-build myapp --from-dir=.

Once the build has completed, deploy the image created by the build.

oc new-app myapp

You can then expose the service.

oc expose svc/myapp

Every time you want to make a change, you will need to run the same oc start-build command in the directory where your source code is.

like image 112
Graham Dumpleton Avatar answered Sep 02 '26 04:09

Graham Dumpleton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!