To deploy an application hosted in a repository, click on the button. A dialog will open in which you must fill the necessary data to deploy the application.
Deploy from Git dialog
- App Name: with application name
- Target Language: with the programming language in which the application is implemented
- Repository URL: with the repository URL (https://github.com/napptive/go-example-launcher-app.git)
- Personal access token: If the repository is private, you will need to select the private repository option and enter a personal access token
Once you have filled in the personal access token (PAT) and the repository URL, you can check if you have access to the repository by clicking on the button.
At the top level, the launching an application in this way involves:
- Cloning the git repository
- Determining the build and execution workflow attending to the target language. Supported languages include: Golang, NodeJS, Python, and static content.
- Building the code
- Running the application
For more details on the steps involved in the different languages check the default workflow phases. There is the possibility of customizing the deployment, indicating the ports, inputs, etc. necessary for the proper functioning of the application. To do this you need to add a
workflow.yaml file to your application’s repository.
You can use this example project to deploy see the workflow:
version: 0 application: language: go ports: - port: 3000 ingress: true ingressPath: / pre-exec: commands: - cmd: date # Print the deployment date
Notice that this operation does not require a
Dockerfile and does not build and publish any docker container. Your repository code will be built inside the running application and executed locally.
Alternatively, you can use the CLI to deploy applications from git using:
playground apps deploy <git_repository_URL>
There are several flags that will allow you to customize the deployment:
- Application Flags:
--env: to indicate the account/environment in which the application will be deployed
--name: with the Application Name
- Private repositories flags:
--gitPAT: with GitHub Personal Access Token, required for private repositories
--gitUser: GitHub Username, required for to download private repositories
- Deployment flags:
--envsto add environment variables to the application.
--execArgswith the arguments required to execute the program. These args will be separated by spaces
--portswith a list of ports to expose
--ingresseswith a list of ports to expose the application to internet
--langwith the application language. Allowed values: “go”, “static”, “python” or “nodejs”. If it is not filled, the playground will be tried to identify it
--mainFilethe main file path. If it is not filled, the playground will be tried to find it