From 78bc17ce3be7154957d578f672449f520c47e005 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Thu, 16 Sep 2021 22:52:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20WIP:=20docker-compose=20+=20gith?= =?UTF-8?q?ub=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 19 +++++++++++++++++++ .gitignore | 1 + docker-compose-sqlite.yml | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 docker-compose-sqlite.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec7dfa4c..35aa98c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,3 +40,22 @@ jobs: docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-$(echo $GITHUB_SHA | head -c7) docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-latest + # + - name: Build sqlite container image + run: | + docker build --build-arg DATABASE_TYPE=sqlite \ + --tag ghcr.io/$GITHUB_ACTOR/umami:sqlite-$(echo $GITHUB_SHA | head -c7) \ + --tag ghcr.io/$GITHUB_ACTOR/umami:sqlite-latest \ + . + + - name: Docker login + run: >- + echo "${{ secrets.GITHUB_TOKEN }}" + | docker login -u "${{ github.actor }}" --password-stdin ghcr.io + + - name: Push image to GitHub + run: | + docker push ghcr.io/$GITHUB_ACTOR/umami:sqlite-$(echo $GITHUB_SHA | head -c7) + docker push ghcr.io/$GITHUB_ACTOR/umami:sqlite-latest + docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-$(echo $GITHUB_SHA | head -c7) + docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-latest diff --git a/.gitignore b/.gitignore index 1f55fbcc..9151a1be 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ yarn-error.log* .env.development.local .env.test.local .env.production.local +prisma/db diff --git a/docker-compose-sqlite.yml b/docker-compose-sqlite.yml new file mode 100644 index 00000000..c7821945 --- /dev/null +++ b/docker-compose-sqlite.yml @@ -0,0 +1,10 @@ +version: '3' +services: + umami: + image: ghcr.io/mikecao/umami:sqlite-latest + ports: + - "3000:3000" + environment: + DATABASE_TYPE: sqlite + HASH_SALT: replace-me-with-a-random-string + restart: always