Deploy to Production #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Production | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| image-tag: | |
| type: string | |
| required: true | |
| description: "Image tag to deploy (e.g., 3.0.1 or sha-abc123)" | |
| deploy-app: | |
| type: boolean | |
| default: true | |
| description: (Re-)deploy server + webapp | |
| deploy-db: | |
| type: boolean | |
| default: false | |
| description: (Re-)deploy Redis database. Usually not necessary. | |
| deploy-proxy: | |
| type: boolean | |
| default: false | |
| description: (Re-)deploy Traefik reverse proxy. Usually not necessary. | |
| workflow_call: | |
| inputs: | |
| image-tag: | |
| type: string | |
| required: true | |
| description: "Image tag to deploy" | |
| deploy-app: | |
| type: boolean | |
| default: true | |
| description: (Re-)deploy server + webapp | |
| deploy-db: | |
| type: boolean | |
| default: false | |
| description: (Re-)deploy Redis database. Usually not necessary. | |
| deploy-proxy: | |
| type: boolean | |
| default: false | |
| description: (Re-)deploy Traefik reverse proxy. Usually not necessary. | |
| concurrency: | |
| group: deploy-production | |
| cancel-in-progress: false | |
| permissions: {} | |
| jobs: | |
| deploy-db: | |
| if: ${{ inputs.deploy-db }} | |
| uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main | |
| with: | |
| environment: Production | |
| docker-compose-file: "./docker/compose.db.yml" | |
| main-image-name: ghcr.io/ls1intum/apollon/server | |
| image-tag: ${{ inputs.image-tag }} | |
| deployment-base-path: "/opt/apollon/db" | |
| secrets: inherit | |
| deploy-proxy: | |
| if: ${{ inputs.deploy-proxy }} | |
| uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main | |
| with: | |
| environment: Production | |
| docker-compose-file: "./docker/compose.proxy.yml" | |
| main-image-name: ghcr.io/ls1intum/apollon/server | |
| image-tag: ${{ inputs.image-tag }} | |
| deployment-base-path: "/opt/apollon/proxy" | |
| secrets: inherit | |
| deploy-app: | |
| if: ${{ inputs.deploy-app }} | |
| uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main | |
| with: | |
| environment: Production | |
| docker-compose-file: "./docker/compose.app.yml" | |
| main-image-name: ghcr.io/ls1intum/apollon/server | |
| image-tag: ${{ inputs.image-tag }} | |
| deployment-base-path: "/opt/apollon/app" | |
| secrets: inherit |