-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added default docker-compose and switched build to tag based multiarch
- Loading branch information
Showing
2 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,59 @@ | ||
name: Publish Docker image | ||
name: ci | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
branches: [ master ] | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Login to DockerHub Registry | ||
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | ||
- name: Build the Docker image | ||
run: docker build . --file docker/Dockerfile --tag hascheksolutions/backupdrop:$(date +%s) --tag hascheksolutions/backupdrop:latest | ||
- name: Push the Docker image to the registry | ||
run: docker push hascheksolutions/backupdrop | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
hascheksolutions/backupdrop | ||
ghcr.io/hascheksolutions/backupdrop | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: '3.8' | ||
|
||
services: | ||
backupdrop: | ||
image: hascheksolutions/backupdrop | ||
ports: | ||
- "8080:80" | ||
environment: | ||
# remove unneeded config options | ||
- ENCRYPTION_AGE_SSH_PUBKEY= | ||
- ENCRYPTION_AGE_PUBKEY= | ||
- S3_BUCKET= | ||
- S3_ACCESS_KEY= | ||
- S3_SECRET_KEY= | ||
- S3_ENDPOINT= | ||
- KEEP_N_BACKUPS= | ||
- KEEP_N_DAYS= | ||
- KEEP_N_GIGABYTES= | ||
- FTP_SSL= | ||
- FTP_SERVER= | ||
- FTP_PORT= | ||
- FTP_USER= | ||
- FTP_PASS= | ||
- FTP_BASEDIR= | ||
restart: unless-stopped | ||
volumes: | ||
- ./data:/var/www/backupdrop/data | ||
|