Skip to content

Commit

Permalink
Rename to standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
tchapi committed Mar 9, 2024
1 parent 4b7491b commit b5572d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/main.yml
Expand Up @@ -9,7 +9,7 @@ env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
ACCOUNT: tchapi

jobs:
build:
Expand All @@ -21,6 +21,11 @@ jobs:
platform:
- linux/amd64
- linux/arm64
include:
- dockerfile: docker/Dockerfile
image: davis
- dockerfile: docker/Dockerfile-standalone
image: davis-standalone
steps:
-
name: Prepare
Expand All @@ -36,7 +41,7 @@ jobs:
uses: docker/metadata-action@v5
with:
context: git
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.ACCOUNT }}/${{ matrix.image }}
# "Push by digest" needs an untagged ref
tags: |
type=raw,value=
Expand All @@ -63,12 +68,12 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.ACCOUNT }}/${{ matrix.image }},push-by-digest=true,name-canonical=true,push=true
-
name: Export digest
run: |
Expand All @@ -87,6 +92,12 @@ jobs:
merge:
name: Create merged manifest and push to Github Packages
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- davis
- davis-standalone
needs:
- build
steps:
Expand Down Expand Up @@ -115,7 +126,7 @@ jobs:
uses: docker/metadata-action@v5
with:
context: git
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.ACCOUNT }}/${{ matrix.image }}
tags: |
type=semver,pattern={{version}}
type=edge,branch=${{ github.ref_name }}
Expand All @@ -140,8 +151,8 @@ jobs:
--annotation index:org.opencontainers.image.source="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.source'] }}" \
--annotation index:org.opencontainers.image.url="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.url'] }}" \
--annotation index:org.opencontainers.image.revision="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}" \
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
$(printf '${{ env.REGISTRY }}/${{ env.ACCOUNT }}/${{ matrix.image }}@sha256:%s ' *)
-
name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.ACCOUNT }}/${{ matrix.image }}:${{ steps.meta.outputs.version }}
4 changes: 2 additions & 2 deletions docker/Dockerfile-combined → docker/Dockerfile-standalone
@@ -1,8 +1,8 @@
FROM php:8.2-fpm-alpine

LABEL org.opencontainers.image.authors="tchap@tchap.me"
LABEL org.opencontainers.image.url="https://github.com/tchapi/davis/pkgs/container/davis"
LABEL org.opencontainers.image.description="A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 4"
LABEL org.opencontainers.image.url="https://github.com/tchapi/davis/pkgs/container/davis-standalone"
LABEL org.opencontainers.image.description="A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 4 (Standalone version with reverse-proxy)"

# Run update, and gets basic packages and packages for runtime
RUN apk --no-progress --update add --no-cache \
Expand Down
Expand Up @@ -17,11 +17,11 @@ services:
davis:
build:
context: ../
dockerfile: ./docker/Dockerfile-combined
dockerfile: ./docker/Dockerfile-standalone
image: davis:latest
# If you want to use a prebuilt image from Github
# image: ghcr.io/tchapi/davis:edge
container_name: davis
# image: ghcr.io/tchapi/davis-standalone:edge
container_name: davis-standalone
environment:
- APP_ENV=prod
- DATABASE_DRIVER=mysql
Expand Down

0 comments on commit b5572d8

Please sign in to comment.