Project:Deployment

From MaRDI portal

The portal-compose repository can be deployed to staging and to production.

In both cases the docker images that are pulled for each service are defined at the top of the docker-compose.yml and docker-compose-extra.yml files.

Deployment to staging

The deployment script in staging is configured to pull the main branch in portal-compose. The deployment can be triggered by just executing the corresponding Github action as shown in the staging server repository.

Deployment to production

Only tagged versions of the portal-compose repository can be deployed to production. This way we can more easily roll back to a previous version if necessary.

To deploy a new version of portal-compose to the production server:

  1. After merging the latest pull request, create a tag and push it to the repository. Make sure that the tag_version is in conjunction with the latest released version.
    git tag -s <tag_version>
    git push origin <tag_version>
    
  2. Create a new release.
    1. Go to the releases section in Github.
    2. Click 'Draft a new release'
    3. Select your latest tag in the dropdown menu
    4. Click 'Generate release notes'
    5. Click 'Publish release'
  3. Update the deploy script in the production server to make sure that it deploys the corresponding tag.
    1. Change the line
      git checkout <latest_tag>
      
    2. Push the changes. Deployment follows automatically.

Deploy changes from the wikibase repository

To make sure that changes from docker-wikibase are deployed just double-check that the correct tag for the docker-wikibase image is indicated at the top of the docker-compose.yml file.