🐳 Update to modern Docker Compose v2 and fix GitHub Actions CI/CD

- Update docker-compose.yml to use modern 'docker compose' syntax (v2)
- Fix GitHub Actions Docker login to use GitHub Container Registry (ghcr.io)
- Add comprehensive GitHub repository settings documentation
- Add alternative CI/CD workflow without Docker push requirement
- Update package.json scripts for modern Docker commands
- Add Docker security scanning and metadata extraction
- Add repository permissions configuration for GitHub Actions
- Update Docker documentation with modern practices

This addresses the Docker login issues and modernizes the deployment
process while providing fallback options for CI/CD implementation.
This commit is contained in:
Alvin-Zilverstand
2026-01-19 10:15:52 +01:00
parent d2b3892992
commit e0c89bbb87
6 changed files with 425 additions and 24 deletions

View File

@@ -114,6 +114,9 @@ jobs:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- name: Checkout code
@@ -122,11 +125,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
@@ -135,8 +139,8 @@ jobs:
file: ./deployment/docker/Dockerfile
push: true
tags: |
snowworld/narrowcasting:latest
snowworld/narrowcasting:${{ github.sha }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
env: