How to change the local folder for an App Engine project? - apache

TIA for your help.
I recently started experimenting with Google App Engine, and I have been able to set up a project successfully.
However, I made a mistake with the location of my local files and I would like to change it.
This is the output from my console when I deploy:
jnkrois#dev:~/Development/My_Project$ gcloud app deploy
Initializing App Engine resources...done.
You are about to deploy the following services:
My_Project/default/1234567890 (from [/home/jnkrois/Development/My_Project/app.yaml])
Notice that the local folder is /home/jnkrois/Development/My_Project/app.yaml
I want to change the gcloud settings in order to pull the files from my /var/www/html/My_Project/
That way I can run the project locally via my Apache server.
Thanks for your help.

That way I can run the project locally via my Apache server.
In the vast majority of cases you won't be able to run your GAE project through apache. Except, maybe, for a totally static website with a very particular config.
The proper way to run your GAE project locally is using the development server, see Using the Local Development Server
But to answer your question - there is no extra dependency of the project outside the project directory, so just move the project directory to where you want (up to you to check address any permission issues, assuming all permissions are met in the example below) and run the gcloud cmd from the new project location:
mv /home/jnkrois/Development/My_Project /var/www/html
cd /var/www/html/My_Project/
gcloud app deploy
Again, donno if this will help you run it through apache or not.

Related

how to build and deploy angular 8 application in tomcat server?

basically i am java web developer , now i change one old web application into angular and spring boot microservices. i learn basic angular form youtube tutorials and other sources , but i have big confusion on deployment , when we run command ng build --prod ,it compress all files and create dist folder.
i copy all file from dist folder and paste inside tomcat webapps folder and application run fine ,
now i want to know it is necessary to build whole project every time ? and repeat same process again and again when we make any changes on our local development machine.
i try to find the solution a lot search on google but did not get any solution please suggest me what is the proper way for deployment from local machine to production server
You can use another external front server as node.js instead of embedding the front whitin a tomcat.
with a node.js server maybe you will be able to use the ng serve -o to change files and hot swap these changes easy
Another thing you can do is to set a devops environment, but this is more difficult.

Steps to get angular 2 universal starter to deploy to an external server host (Google Cloud, Azure, etc)?

I cloned universal-starter (webpack version) and have it up and running on my local machine using npm start and npm run watch per the instructions
Now stuck after npm run build and attempting to deploy to Azure (and Google Cloud) via the github integration - can't figure out how to set up either to work.
Anyone have a recipe on how to get the webpack bundled files to fire up on an external host with express.js? Do I need to run commands via a CI integration? The files in /dist don't seem to stand on their own.
At Netlify you can connect your git repo and tell them what build commands you want them to use. If you specify the "dist" directory, then they will deploy anything that gets in there (after they have compiled your application).
Edit: the lowest tier is free.
Edit2: I am not associated with Netlify. I just used them in my latest deploy, and found the process extremely easy.
Note: This has changed dramatically since Angular 2. While I'm now moved on to SSR, docker, and all kinds of other things, the simplest answer was to
1) Production build
ng build --prod
2) Transfer files to a static web host (i.e., I used awscli to connect to a s3 bucket when it was just a static site...I know use SSR so I need to use a node server like express)
3) Serve files (there are some complexities for redirect requirements for index.html for error and for 404...and of course setting the status for both redirects to 200)
4) Put something on the frontend for performance/ ssl/ etc. nginx or a CDN would make sense.

Openshift: adf application not runnig on openshift

I've installed glassfish server and some additional libraries to run adf application using following link
http://multikoop.blogspot.co.uk/2012/09/adf-essentials-in-redhat-cloud.html
I've copied .ear file in the /app-root/repo/diy/glassfish3/glassfish/domains/domain1/autodeploy. when I run the app, its throwing below error.
Not Found
`/testApp/faces/test.jsf' not found.
WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30) at <app>-<domain>.rhcloud.com:80
a) I am not sure if the glassfish was installed properly as I just used
wget http://download.java.net/glassfish/3.1.2.2/release/glassfish-3.1.2.2.zip
unzip glassfish-3.1.2.2.zip
is there any way to find that out?
b) how can access the admin console?
c) does it deploy the app just copying the .ear file in the autodeploy directory?
d) how can I resolve above issue?
thanks
While the admin interface doesn't work on this one either, there is a glassfish quickstart located here https://github.com/shekhargulati/glassfish4-openshift-quickstart that should get you up and running. I would recommend starting there and then following the instructions to get the adf components installed.

problems deploying openMRS.war to glassfish v.2

I'm trying to deploy openMRS v.1.9.2 to a local VM running CentOS & Glassfish 2 for work. Unfortunately, I could not get it to work. Normally, I just download the standalone found at source forge. I just double-click the jar, and I'm good to go.
I normally just SSH into the the VM, so I first tried doing everything through a terminal. Here are the steps I took:
Using wget, retrieve the .zip
Create a dir (I just called it /openmrs), cd into the new directory, and then expand the .zip.
cd into the directory.
At this point, there are two options to start openMRS.
Run the bash script: ./run-on-linux.sh
Run the .JAR: java -jar [insert_jar_name].jar -commandline
When I run the .JAR, I get a stack trace.
When I try to run the bash script, I get another error.
Anyways, I thought I found a potential solution in an openMRS JIRA ticket, but it seems aimed at Glassfish 3, and not Glassfish 2 (which is what I need to use).
I then tried deploying the .WAR via the Glassfish admin UI. I thought it would work, but after going through the steps of selecting a language, whether or not to use demo data, etc. I received this.
Does anyone have experience deploying openMRS to Glassfish 2.1.1? Unfortunately Glassfish 3 doesn't seem to be a realistic option. I would really appreciate any help here. Thanks.
Although it doesn't solve my problem of not being able to successfully deploy openMRS to an instance of Glassfish v.2, I did manage to get myself further by just installing MySQL on the VM. Our work machines are all set up for postgres, so I think should have guessed earlier that not having a MySQL server installation was the problem.
Here is a tutorial I used to install MySQL

Running multiple Rails projects on Ubuntu

I'm brand new to Rails. I have one Rails project on my machine, but I'd like to create a 2nd project from scratch and I'm having trouble figuring out where and how to set it up. Specifically:
My current project is located in the Projects/project1 directory. I'd like to have it located in Projects/project2. Do just reinstall Rails into that directory?
I still need access to project1. How do I switch back and forth between the two projects in terms of browser access? Will it be a separate server? Do I have to edit a file to switch?
Anything else you think I might need to know in order to manage multiple projects. Please assume that I know nothing about the setup as I'm just getting started.
My current project is located in the Projects/project1 directory. I'd like to have it located in Projects/project2. Do just reinstall Rails into that directory?
Just create a new Rails project in that directory by running rails new:
$ cd Projects
$ rails new project2
You'll have a new (empty) Rails application in project2.
I still need access to project1. How do I switch back and forth between the two projects in terms of browser access? Will it be a separate server? Do I have to edit a file to switch?
Assuming you're running local servers via rails server, you can specify which port your server is running on via -p.
Given a Rails project, you can listen on localhost:3001 by executing
$ ./script/rails server -p 3001
To run multiple Rails projects locally, make sure they're all running on a unique port.
Anything else you think I might need to know in order to manage multiple projects. Please assume that I know nothing about the setup as I'm just getting started.
Depending on your platform, you should look into Pow or Passenger which automate the process of deploying multiple Rails apps to a single server.