Project:Deployment

From MaRDI portal
Revision as of 16:25, 21 March 2024 by EloiFerrer (talk | contribs) (Created page with "The [https://github.com/MaRDI4NFDI/portal-compose 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 [https://github.com/MaRDI4NFDI/portal-compose/blob/main/docker-compose.yml docker-compose.yml] and [https://github.com/MaRDI4NFDI/portal-compose/blob/main/docker-compose-extra.yml docker-compose-extra.yml] files. == Deployment to staging == The [https://...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 staging. 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>
  1. 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'
  1. 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>
    1. Push the changes. Deployment follows automatically.

Deploy changes from the wikibase repository

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