From 8fc5dd85c2d2ef6de384321fca6912e153b44d54 Mon Sep 17 00:00:00 2001 From: South Drifted Date: Thu, 5 Oct 2023 21:54:14 +0000 Subject: [PATCH] feat: add Object Storage configuration based on JuiceFS feat: add GitHub actions configuration of Docker Compose deployment --- .github/workflows/deploy-oss.yml | 63 ++++++++++++++++++++++++++++++++ docker-compose.yml | 13 +++++++ start-docker.sh | 9 +++++ 3 files changed, 85 insertions(+) create mode 100644 .github/workflows/deploy-oss.yml create mode 100644 start-docker.sh diff --git a/.github/workflows/deploy-oss.yml b/.github/workflows/deploy-oss.yml new file mode 100644 index 0000000..02fa95e --- /dev/null +++ b/.github/workflows/deploy-oss.yml @@ -0,0 +1,63 @@ +# reference: +# 1. https://github.com/docker/build-push-action/blob/master/docs/advanced/push-multi-registries.md +# 2. https://github.com/docker/build-push-action/blob/master/docs/advanced/share-image-jobs.md + +name: Deploy to Production environment +on: + push: + tags: + - v* +env: + ARTIFACT_PATH: /tmp/artifact.tar + BOX_NAME: api-service + BOX_URL: polyfiller/api-service + +jobs: + deploy_docker_image: + name: Deploy Docker image + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 + + - name: Build Image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + tags: ${{ env.BOX_URL }}:latest + outputs: type=docker,dest=${{ env.ARTIFACT_PATH }} + + - name: Pick Docker Compose + run: | + cat > .env <