Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Deploy Docker Images on remote VM #31

Merged
merged 61 commits into from
Jun 20, 2024
Merged

Conversation

FabianUntermoser
Copy link
Collaborator

@FabianUntermoser FabianUntermoser commented Jun 7, 2024

Description

This PR sets up rudimentary deployment of the development branch to a remote VM preview.vim.org.

Changes:

  • Adds second docker compose file specifying images that were pushed to the Github Container Registry
  • Adds Github deploy action to deploy the app on a remote VM
    • this action should be triggered after either of the build jobs finish. However this does not seem to work currently. A guess is that the github actions need to be placed in the default branch for it to work.
  • Nginx configuration has been adjusted, config files were checked into the repo manually
  • Changes to the VM have been documented in its respective changelog file
  • Configures CMS Strapi backend to run behind the context_path defined in CMS_URL
    • only when not in local development
    • for the development environment https://preview.vim.org/cms/admin/ is used in the repository var CMS_URL
    • note that the CMS_URL variable is required to be set at build time in order for internal Strapi routes to properly use the context path correctly
  • Adds cronjob to clean up stale docker images on the remote VM

Not included:

  • Setup Database Migrations if necessary.
  • Seems that the Content Manager for single types in Strapi is not reachable
    • https://preview.vim.org/cms/admin/content-manager/singleType/api::home.home not reachable
    • https://preview.vim.org/cms/admin/content-manager/collectionType/api::newspost.newspost works

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore
  • ⏩ Revert

@FabianUntermoser FabianUntermoser changed the title CI: VM Deployment CI: Deploy Docker Images on remote VM Jun 10, 2024
.env.example Outdated Show resolved Hide resolved
.github/workflows/deploy-vm.yml Outdated Show resolved Hide resolved
docker-compose.dev.yml Show resolved Hide resolved
docker-compose.dev.yml Show resolved Hide resolved
docker-compose.dev.yml Show resolved Hide resolved
docker-compose.local.yml Show resolved Hide resolved
cms/.env.example Outdated Show resolved Hide resolved
FabianUntermoser and others added 4 commits June 18, 2024 09:58
Co-authored-by: Johannes Munker <56400587+jomunker@users.noreply.github.com>
CMS_URL var configures the context path for the STRAPI CMS backend.
It is required at build time in order to make STRAPI internal routes work.
It is not needed in local development, as there no contextpath is required.
@jomunker jomunker merged commit e95af58 into development Jun 20, 2024
3 checks passed
@jomunker jomunker deleted the feature/deployment-vm branch June 20, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants