diff --git a/.env.example b/.env.example index 4a6a1b9..d54ec8b 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,2 @@ +IMAGE_TAG=latest MAIN_PORT=8080 diff --git a/.github/workflows/BuildDev.yml b/.github/workflows/BuildDev.yml index 209e937..996c3e7 100644 --- a/.github/workflows/BuildDev.yml +++ b/.github/workflows/BuildDev.yml @@ -51,11 +51,11 @@ jobs: push: true provenance: false build-args: | - APP_VERSION=${{ steps.version.outputs.value }} - VCS_REF=${{ github.sha }} + APP_VERSION=${{ github.sha }} + VCS_REF=${{ github.run_number }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev labels: | - org.opencontainers.image.version=${{ steps.version.outputs.value }} - org.opencontainers.image.revision=${{ github.sha }} + org.opencontainers.image.version=${{ github.sha }} + org.opencontainers.image.revision=${{ github.run_number }} org.opencontainers.image.source=https://github.com/${{ github.repository }} diff --git a/.github/workflows/BuildLatest.yml b/.github/workflows/BuildLatest.yml index 94cf8df..376aa6a 100644 --- a/.github/workflows/BuildLatest.yml +++ b/.github/workflows/BuildLatest.yml @@ -57,14 +57,13 @@ jobs: push: true provenance: false build-args: | - APP_VERSION=${{ steps.version.outputs.value }} - VCS_REF=${{ github.sha }} + APP_VERSION=${{ github.sha }} + VCS_REF=${{ github.run_number }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.docker_tag }} labels: | - org.opencontainers.image.version=${{ steps.version.outputs.value }} - org.opencontainers.image.revision=${{ github.sha }} + org.opencontainers.image.version=${{ github.sha }} + org.opencontainers.image.revision=${{ github.run_number }} org.opencontainers.image.source=https://github.com/${{ github.repository }} - name: Create GitHub release diff --git a/Dockerfile b/Dockerfile index 0aefbec..b314db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM nginx:1.27-alpine -ARG APP_VERSION=0.0.0 ARG VCS_REF=unknown +ARG APP_VERSION=unknown -LABEL org.opencontainers.image.title="Maintenance Website" -LABEL org.opencontainers.image.description="Static maintenance website" +LABEL org.opencontainers.image.title="MaintenanceWebsite" +LABEL org.opencontainers.image.description="❌ A simple HTML/CSS/JS maintenance website. " LABEL org.opencontainers.image.version="${APP_VERSION}" LABEL org.opencontainers.image.revision="${VCS_REF}" LABEL org.opencontainers.image.source="https://github.com/Lechner-Systems/MaintenanceWebsite" diff --git a/docker-compose.yml b/docker-compose.yml index 258eac4..40d4c66 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,7 @@ services: - portfolio: + maintenance: image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG:-latest} - build: - context: . - dockerfile: Dockerfile restart: unless-stopped - env_file: - - path: .env - required: false dns: - 192.168.100.2 - 192.168.100.6