Skip to content
Snippets Groups Projects
deploy.md 2.74 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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.
    
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ## Configuration of MobaXterm
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    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.
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ## Deploy Ecolyo
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    ### Deploy version to builds branches
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    3 builds branch are today available for Ecolyo:
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    - 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
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    #### Windows
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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)
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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 :
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    yarn
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    yarn build
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    After this, you can launch the deployment using the command linked to the target branch.
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ```
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    # deploy on build-test branch
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    yarn deploy-test
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    # deploy on build-dev branch
    yarn deploy-dev
    # deploy on build branch
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    yarn deploy
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    #### Linux
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    From your current branch, run `yarn build`.
    After this, you can launch the deployment using the command linked to the target branch.
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    # deploy on build-test branch
    yarn deploy-test
    # deploy on build-dev branch
    yarn deploy-dev
    # deploy on build branch
    yarn deploy
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    ### Deploy build-dev branch to Scaleway
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    You can now deploy the content of build-dev branch into Scaleway using the scripts present on the Scaleway server.
    For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/).
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    ### Deploy build branch to Cozy
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    Use thecozy-app-publish command after replacing following value:
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    - $REGISTRY_TOKEN : token provided by Cozy team
    - $VERSION_NUMBER: version of the application
    - $COZY_SPACE: space of the Cozy 
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    
    ```
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    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
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ```
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/)