Capistrano 3: Doing a Git pull on the an existing deploy relese folder - capistrano3

I was using Capistrano 3 to do a deploy of a PHP app from my linux machine.
All was working well until the machine I was using to do the deploy died.
Now all I want is: On the Server when I used to deploy: do a git pull on the last deployed folder to get the changes I have.
Any clue as to how this can be done.
I see no .git folder in the last deployed release folder
I do see repo, but running any command in it does not help.
Please help, thx in advance.

Related

I cannot deploy only the build folder of a ReactJS application in the Azure Linux environment

In some tutorials I found to deploy a ReactJs application in the Azure environment, a Windows machine is used, but I would like to use a Linux machine, in which case I can only send all project sources to the server.
../src
../public
I would like to know if it is possible to deploy only the contents of the build folder. Because I'm trying for days and I can't get it.
I will explain what I have done.
First, you should change "homepage" value to "." in package.json
after that, you set the route path with "/"
and then "yarn -s build" or "npm run-script build" in your terminal.
then the build folder will be created.
copy all files in "build" folder and paste it to your /var/www/html(it is dynamic)
I can help you remotely.
I hope this answer helps you.

Deploying ReactJs app in my machine through localhost

I create a reactJs App. But for now I run this app through Intellij idea and I would like to deploy it and run permanently in my machine without turning on through Intellij idea. How I could deploy react app and run it as deployment in my machine
If you created your app with create-react-app, you should be able to start local development server from the command line. To do this, open you project's root directory in the terminal and type npm start.
If you would like to create and serve a production bundle, you should build your project with npm run build and then serve build directory with a web server. The easiest way to do this is install serve via npm (npm install -g serve) and run serve -s build
For this purpose only webservers available like Tomcat, Payara, Whildfly, etc. You can install any one of those servers and deploy your application into that. As on when you started the server your application will be accessible.
Approach 1:
You can set up the server into your IDE and simply run the project on server mode.
Approach 2:
By using your project code, create a war file with the help of any build tool like MAVEN/GRADLE, etc. Then login into the server manager(Tomcat Manager) and deploy the generated .war file in deployment section.
Note: With the 2nd approach, you can access the application as on when you start the server.

How to deploy my Laravel React project in production status

I currently now deploying my project to our server, before i do the deployment I have step to do before i send it to our server.
First on my cmd I type npm install composer.
Second on my cmd I type npm run production.
Third i check first my project to determine if the status of production of react logo on the top of browser turning to blue in which finally my project now on production.
Finally I zip my files and send it to the server.
Those are the scenario that I do before I deploy my project in production mode.
however in my case I have problem when i browse my application URL. ex. www.mylaravelreact.com the directory of my files is shown to my application.
I read some question regarding problem about why does my site say index of and list my files https://www.webhostinghub.com/help/learn/website/website-help/why-does-my-site-say-index-of-and-list-my-files
In my Root Folder i have server.php
In my Public Folder i have index.php
Why does my site look this when i open it.

React web-page won't display on server

I have been trying to deploy my create-react-app on a server but have been unable to do so. I created a homepage field in the package.json as instructed and set it to the https://... domain address. Then I ran npm run build and created the build file. I am finding resources sparse online, instructing me what to do after. Running npm start just runs from the root directory, not displaying anything. The source shows and index.html file which paths are stuck at the root. I am wondering what I need to do to run/deploy the build(production). I have tried downloading the npm package serve, but this seems to do the same as npm run, if not worse. I feel like I am only moving in the opposite direction, and would love some assistance. Thank you.
You need to run npm build.
This creates files in the build folder.
These files you then need to take and put them in a folder that is served by a web server.
You can use Nginx, Apache, IIS or any other production ready web server.
You have an IT department, ask them where exactly you need to put your files.

Missing Files in Drupal 7 on OpenShift

I have a drupal installation running on OpenShift. I have been installing all modules and themes using git (commandline). However, I attempted to install the modules directly and the installation worked.
The problem that I now face is that when I attempt a pull request all I get is the modules and themes I had installed using the commandine and not the ones that I installed 'directly'.
Any one with a heads up on this?
OpenShift runs your code form a checkout of the git repository located at ~/app-root/repo within your gear. When you upload files using Drupal (instead of the git repository), the modules and themes are installed in this checked out directory and are not tracked in git.
I you are using a scaled application, I would recommend that copy the modules/themes and check them into git instead of the Drupal install method.
For now, to retrieve all your files you can try the rhc export command.
Thanks to #kraman above I got a hint of what to do.
I ran rhc snapshot save -a appname and got all the files. At least I know where to start off from since I can access the files.
A word of caution though for drupal users on openshift, just use git or sftp for pushing files and save yourself the headache.

Resources