feat: tidy docker setup

Tidy the docker setup and include a Github Action
for publishing docker containers to DockerHub and
Github Container Registry.

Also add a small README file with docker hosting instructions.
This commit is contained in:
Mythie
2024-03-06 15:46:51 +11:00
parent 927cb1a934
commit 2cce6dc2e5
13 changed files with 290 additions and 92 deletions

40
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Publish Docker
on:
push:
branches: ['release']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Build the docker image
run: ./docker/build.sh
- name: Push the docker image to DockerHub
run: docker push --all-tags documenso/documenso
- name: Push the docker image to GitHub Container Registry
run: docker push --all-tags ghcr.io/documenso/documenso