diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 000000000..c799a6012 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,41 @@ +name: Build MapleDeploy Coolify Image + +on: + push: + branches: [mapledeploy] + paths-ignore: + - "*.md" + - ".github/**" + - "templates/**" + +env: + REGISTRY: forgejo.mapledeploy.ca + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Get version + id: version + run: | + VERSION=$(docker run --rm -v "$PWD:/app" -w /app php:8.2-alpine3.16 php bootstrap/getVersion.php) + echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT" + echo "Building version: ${VERSION}" + + - name: Login to Forgejo registry + run: | + echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ github.repository_owner }} --password-stdin + + - name: Build image + run: | + docker build -f docker/production/Dockerfile \ + -t ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.version.outputs.VERSION }} \ + -t ${{ env.REGISTRY }}/${{ github.repository }}:latest \ + . + + - name: Push image + run: | + docker push ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.version.outputs.VERSION }} + docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile index 2ce8c834e..ee6a75756 100644 --- a/docker/production/Dockerfile +++ b/docker/production/Dockerfile @@ -6,7 +6,8 @@ ARG MINIO_VERSION=RELEASE.2025-05-21T01-59-54Z # https://github.com/cloudflare/cloudflared/releases ARG CLOUDFLARED_VERSION=2025.7.0 # https://www.postgresql.org/support/versioning/ -ARG POSTGRES_VERSION=15 +# MapleDeploy: Alpine 3.23 ships pg17, not pg15 +ARG POSTGRES_VERSION=17 # Add user/group ARG USER_ID=9999