Application deployment
Deployment combines code updates with commands that prepare the application. Open deployment script configuration in the project.
Save a script
- Enter commands appropriate for the project.
- Set a working directory that exists on the server.
- Select a Linux user with the required directory permissions.
- Choose whether to pass saved project environment variables.
- Save the script and configuration. Saving alone starts nothing.
Run
- Git pull: updates code and runs the saved deployment script after a successful update if configured.
- Run saved script without Git pull: executes commands against the current code. Save the current script and configuration first.
Follow the operations list, history and logs. A state requiring verification is not confirmed success; establish whether the original command finished before repeating it.
Script contents
Depending on the application, commands may install dependencies, build assets, run migrations or refresh application caches. Use commands and runtime versions appropriate for the project. Plan migrations and other data changes with recovery in mind.
Older scripts may use the original execution context as root. When editing them, explicitly save the working directory and user.
Verify results
After success, test the application through its domain and check running processes. Returning to an older commit alone does not restore the previous database state.