Deploying Your Application With Git
Deploying any application is incredibly easy with Git, which comes installed in every Webslice Container image.
Generate an SSH Key
Start by generating an SSH key for your Container, using this command:
Press Enter every time the commands asks for input.
Add Your SSH Key to Git
Get your newly created SSH key with the following command:
Copy the output of the command and go to your GitHub/GitLab/Bitbucket account settings. The process is very similar for each of these options.
Through Settings find the SSH Keys option, then New SSH Key.
Enter a title, then paste in the new SSH key which you copied earlier.
Clone Your Repository on to the Container
Now you can clone your project into your Container. SSH into the Container to begin.
If you want to check that Git is installed on your Container, run this command:
Usually, your application should be located on the /container/application/
directory. Head here to clone your project.
Clone your project to the Container. The dot at the end of this command tells Git to clone the project in the current folder:
You ought to see a successful result like this:
Updating Your Project
Now every time you wish to update your project, you can use the git pull
command.
If you are making changes on the Container and want to commit
your changes to the repository, you will get the Please tell me who you are
message. To set your identity on the server, run the following commands with your actual username and email address: