From 484cf7ea9ce81dbab4b23a18046e78c0216ab3d3 Mon Sep 17 00:00:00 2001 From: "opsmaru-staging[bot]" <79324048+opsmaru-staging[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 13:57:04 +0000 Subject: [PATCH] Deployment configuration base-nuxt for filmz. --- .github/workflows/deployment.yml | 49 +++++++++++++++++++++++++++++ instellar.yml | 54 ++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 .github/workflows/deployment.yml create mode 100644 instellar.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..16e299b --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,49 @@ +name: 'Deployment' + +on: + push: + branches: + - main + - master + - develop + +jobs: + build_and_deploy: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@v3 + with: + ref: ${{ github.event.workflow_run.head_branch }} + fetch-depth: 0 + + - name: 'Pakman' + uses: upmaru/pakman@alpine-3.18-7.4 + with: + command: 'bootstrap' + env: + ABUILD_PRIVATE_KEY: ${{secrets.ABUILD_PRIVATE_KEY}} + ABUILD_PUBLIC_KEY: ${{secrets.ABUILD_PUBLIC_KEY}} + + - name: 'Build APK' + uses: upmaru/pakman@alpine-3.18-7.4 + with: + entrypoint: /var/lib/pakman/bin/build.sh + + - name: 'Archive' + uses: upmaru/pakman@alpine-3.18-7.4 + with: + entrypoint: /var/lib/pakman/bin/archive.sh + + - name: 'Create Deployment' + uses: upmaru/pakman@alpine-3.18-7.4 + with: + command: 'create_deployment' + archive: 'packages.zip' + env: + WORKFLOW_REF: ${{ github.ref }} + WORKFLOW_SHA: ${{ github.sha }} + INSTELLAR_ENDPOINT: https://sandbox.opsmaru.dev + INSTELLAR_PACKAGE_TOKEN: ${{secrets.INSTELLAR_PACKAGE_TOKEN}} + INSTELLAR_AUTH_TOKEN: ${{secrets.INSTELLAR_AUTH_TOKEN}} diff --git a/instellar.yml b/instellar.yml new file mode 100644 index 0000000..4e0e83a --- /dev/null +++ b/instellar.yml @@ -0,0 +1,54 @@ +dependencies: + build: + - nodejs-current + - npm + - vips-dev + runtime: + - nodejs-current + - npm + - bash + - curl + - s6 + - jq + - ca-certificates + - icu-data-full + - filmz-openrc + trace: true + +stack: alpine/3.18 + +build: + command: | + npm install + npm run build + destinations: + - .output + +run: + name: filmz + services: + - binary: node + name: web + path: /usr/bin + start: + call: .output/server/index.mjs + +hook: + post-deinstall: | + rc-service filmz stop + rc-update del filmz + post-install: | + rc-update add filmz + post-upgrade: | + rc-service filmz start + pre-upgrade: | + rc-service filmz stop + +kits: + - description: Web service configuration + main: true + name: web + ports: + - main: true + name: web + target: 3000