2021-10-27 20:15:27 -04:00
# SPT Items
2021-10-27 20:06:16 +02:00
2021-10-27 20:15:27 -04:00
## Notes
* This project assumes that the target OS is ubuntu
* This project has been tested on Ubuntu 20.04
* This project assumes that nginx is already installed on the target machine
* You can use either of the two drone pipeline types:
* [docker ](../.drone-docker.yml )
* [kubernetes ](../.drone-kubernetes.yml )
* Some enhancement ideas can be found [here ](#some-enhancement-ideas )
2021-10-27 20:06:16 +02:00
2021-10-27 20:15:27 -04:00
## The pipeline summary
1. Each push will:
1. Builds the frontend
1. Move the build frontend in the backend `public` folder
1. IF Promoted to production, deploys to the server
2021-10-27 20:06:16 +02:00
2021-10-27 20:15:27 -04:00
## Required secrets
| secret name | description | example |
| :-----------------| :---------- | :------- |
2021-10-28 18:23:54 -04:00
| spt_items_hostname | The remote server where spt-items-finder will be reachable < br > used for the frontend resolution | spt-items.my.server.com |
| deploy_hostname | The remote server where to deploy < br > used by Ansible SSH | my.server.com |
2021-10-27 20:15:27 -04:00
| deploy_username | The default username on the remote server < br > used by Ansible SSH < br > This user must have sudo rights | myuser |
| deploy_ssh_key | The **content** of the ssh private key used to connect to the remote server < br > The key needs to be in RSA in "RSA PRIVATE KEY" format < br > The ssh publick key needs to already be in the user used in the remote server ~/.ssh/authorized_keys | -----BEGIN RSA PRIVATE KEY----- < br > The key < br > -----END RSA PRIVATE KEY----- |
2021-10-27 20:06:16 +02:00
2021-10-27 20:15:27 -04:00
## The pipeline walkthrough
see [Walkthrough.md ](./docs/Walkthrough.md )
## The pipeline details
![workflow ](./docs/workflow.png )
## Some enhancement ideas
- Store the build so that it is not rebuilt on any `promote` event
- Use a volume or a cache for Yarn install