diff --git a/docs/ecolyo/application/deploy.md b/docs/ecolyo/application/deploy.md index af20a8a5171d02f3be4b8f3ec9eb8421dc09a100..06e9281cdf93bc32fd605e66b67054a07b32aab3 100644 --- a/docs/ecolyo/application/deploy.md +++ b/docs/ecolyo/application/deploy.md @@ -1,73 +1,55 @@ -This section will show you how to deploy your project on different environments. - -## Setup - -First of all you'll need to install [MobaXterm](https://mobaxterm.mobatek.net/download.html) in order to connect to the server. -Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands. - -## Configuration of MobaXterm +# Deploy -First open a new session and connect to the distant host. Don't forget to add the path to the private key in the advanced SSH settings. Also don't forget to ask an administrator to add your public key so you can access the server. - -## Deploy Ecolyo +This section will show you how to deploy your project on different environments. -### Deploy version to builds branches +## Deploy build to builds branches 3 builds branch are today available for Ecolyo: -- build: reflect the build of the master branch and the version deployed in production environment -- build-dev: reflect the build of the dev branch and the version deployed on dev environment -- build-test reflect a temporary build which can be used for test purpose - -#### Windows +- **build**: reflect the build of the master branch and the version deployed in production environment +- **build-dev**: reflect the build of the dev branch and the version deployed on dev environment +- **build-test**: reflect a temporary build which can be used for test purpose -If you use windows, make sure you have WSL installed and a Linux distribution. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md) +!!! info "Windows users" + Some command did not run on Windows. Please use your Linux distribution installed on your WSL. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md) -First open your Ubuntu terminal (or any other distribution you've installed), and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : +Make sure that: -``` -yarn -yarn build -``` +- you are on the right branch (dev or master) depending on the enviroment you need to deploy. +- your branch is up to date +- you node modules are up to date -After this, you can launch the deployment using the command linked to the target branch. +First build the application : ``` -# deploy on build-test branch -yarn deploy-test -# deploy on build-dev branch -yarn deploy-dev -# deploy on build branch -yarn deploy +$ yarn build ``` -#### Linux - -From your current branch, run `yarn build`. -After this, you can launch the deployment using the command linked to the target branch. +Next you can deploy the build to the target branch: ``` # deploy on build-test branch -yarn deploy-test +$ yarn deploy-test # deploy on build-dev branch -yarn deploy-dev +$ yarn deploy-dev # deploy on build branch -yarn deploy +$ yarn deploy ``` -### Deploy build-dev branch to Scaleway +## Deploy build-dev branch to Scaleway -You can now deploy the content of build-dev branch into Scaleway using the scripts present on the Scaleway server. +You can directly use the content of build-dev branch to update apps on dev environment using scripts (from the server). For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/). -### Deploy build branch to Cozy +## Deploy build branch to Cozy -Use thecozy-app-publish command after replacing following value: +You can deploy content of build branch into Cozy registry by using the cozy-app-publish command after replacing following value: - $REGISTRY_TOKEN : token provided by Cozy team - $VERSION_NUMBER: version of the application - $COZY_SPACE: space of the Cozy ``` -yarn cozy-app-publish --token $REGISTRY_TOKEN --build-url https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/-/archive/build/ecolyo-build.tar.gz --manual-version $VERSION_NUMBER --space $COZY_SPACE +$ yarn cozy-app-publish --token $REGISTRY_TOKEN --build-url https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/-/archive/build/ecolyo-build.tar.gz --manual-version $VERSION_NUMBER --space $COZY_SPACE ``` -More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/) \ No newline at end of file +More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/) + diff --git a/docs/ecolyo/project_architecture/environments.md b/docs/ecolyo/project_architecture/environments.md index d59d44fef479a3f6d4435d0929c1ad1b5146f300..22764fe592120b47c695d29be08885c5e4180887 100644 --- a/docs/ecolyo/project_architecture/environments.md +++ b/docs/ecolyo/project_architecture/environments.md @@ -8,6 +8,12 @@ We have 2 environments available for this project: The dev environnment has been mounted on a dedicated instance on scaleway. +### Access to the dev environment + +You need to install an ssh tool like Putty or [MobaXterm](https://mobaxterm.mobatek.net/download.html) in order to connect to the server. +Connection to the server is made using ssh key, you need to generate your own and ask administrator to allow your ssh key. +Once done, you shoul be able to connect to the server using your private key. + ### Cozy stack It is based on the easy-cozy project available on GitLab: https://forge.grandlyon.com/pocs/cozy/easy-cozy