Marugoto production deploy process - uzh/marugoto GitHub Wiki

Instructions to follow if you have updated frontend, backend or topic content and you want these changes in the live system

If frontend/backend are changed:

  • Make all changes to frontend and backend and content
  • update files containing version with a bumped
    • Frontend: .env, .env.test, .env.production, package.json, then npm install to do package-lock.json
    • Backend: find + replace the old with the , as it is in many files
  • git tag <new-version>
  • git push --tags

This will trigger CI, which builds docker images, which you can see on hub.docker.com/uzhlit

On server

There are four nodes accessible from bastion: frontend/marugoto/db/ci-hooks

  • ssh bastion and then ssh frontend/ssh marugoto nodes
  • Update versions to match latest: vim shell, vim docker-compose.yml
  • restart container: docker-compose down && docker-compose pull && docker-compose up -d

Or, If content is updated

  • Run maruval and marupretty over the content
  • Commit and push the updates
  • in lit-content repo, commit the updated submodule and push

On server

  • The wrangler repo is at cd ~/lit-content
  • Discard changes in content repos, i.e. cd lit-demo && git checkout -- . && cd .. (find a way to skip this?)
  • Get latest content for all topics: git submodule update --recursive --remote
  • rm LICENSE README.md, possibly other non-JSON stuff
  • Enter shell: ./shell
  • reimport game: do-import /content/<topic> <hidden-folder-name> true
  • Attempt and fail to leave shell with ctrl+d
  • from another terminal tab, do docker kill <container-id-of-shell>

Notes:

Currently, different topics cannot share a resource name!

⚠️ **GitHub.com Fallback** ⚠️