mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
testing if sharp can build on alpine all platforms
This commit is contained in:
parent
6ed0401312
commit
89aebfd014
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@ -92,7 +92,7 @@ jobs:
|
||||
needs: [ create-release ]
|
||||
strategy:
|
||||
matrix:
|
||||
container: [ alpine, debian-stretch ]
|
||||
container: [ debian-stretch ]
|
||||
|
||||
steps:
|
||||
- name: Set tag
|
||||
@ -113,14 +113,13 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Test build on Pull request and test branches
|
||||
if: ${{ startsWith(steps.vars.outputs.type , 'head') && ((github.event.issue.pull_request && github.ref == 'refs/heads/master') || github.ref != 'refs/heads/master') }}
|
||||
- name: Build docker
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/${{ matrix.container }}/Dockerfile.build
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- name: Build experimental
|
||||
- name: Push experimental
|
||||
if: ${{ github.ref == 'refs/heads/experimental' }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -129,7 +128,7 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:experimental-${{ matrix.container }}
|
||||
- name: Build and push nightly on new master commit
|
||||
- name: Push nightly on new master commit
|
||||
if: ${{ startsWith(steps.vars.outputs.type , 'head') && !github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -138,7 +137,7 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:nightly-${{ matrix.container }}
|
||||
- name: Build and push release on new Tag
|
||||
- name: Push release on new Tag
|
||||
if: ${{ startsWith(steps.vars.outputs.type , 'tag') && !github.event.issue.pull_request }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -155,7 +154,7 @@ jobs:
|
||||
needs: [ create-release ]
|
||||
strategy:
|
||||
matrix:
|
||||
container: [ debian-buster ]
|
||||
container: [alpine, debian-buster ]
|
||||
|
||||
steps:
|
||||
- name: Set tag
|
||||
@ -176,14 +175,13 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Test build on Pull request and test branches
|
||||
if: ${{ startsWith(steps.vars.outputs.type , 'head') && ((github.event.issue.pull_request && github.ref == 'refs/heads/master') || github.ref != 'refs/heads/master') }}
|
||||
- name: Build docker
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/${{ matrix.container }}/Dockerfile.build
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
- name: Build experimental
|
||||
- name: Push experimental
|
||||
if: ${{ github.ref == 'refs/heads/experimental' }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -192,7 +190,7 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:experimental-${{ matrix.container }}
|
||||
- name: Build and push nightly on new master commit
|
||||
- name: Push nightly on new master commit
|
||||
if: ${{ startsWith(steps.vars.outputs.type , 'head') && !github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -201,7 +199,7 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:nightly-${{ matrix.container }}
|
||||
- name: Build and push release on new Tag
|
||||
- name: Push release on new Tag
|
||||
if: ${{ startsWith(steps.vars.outputs.type , 'tag') && !github.event.issue.pull_request }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
|
@ -2,7 +2,10 @@
|
||||
#-----------------------------------------
|
||||
FROM node:14-alpine3.15 AS builder
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.15/community/ \
|
||||
python3 build-base sqlite-dev sqlite-libs vips-dev vips fftw-dev gcc g++ make libc6-compat && ln -snf /usr/bin/python3 /usr/bin/python
|
||||
python3 build-base sqlite-dev sqlite-libs fftw-dev gcc g++ make libc6-compat && ln -snf /usr/bin/python3 /usr/bin/python \
|
||||
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/ vips-dev>8.12.2-r3 vips>8.12.2-r3
|
||||
|
||||
COPY pigallery2-release /app
|
||||
WORKDIR /app
|
||||
RUN npm install --unsafe-perm
|
||||
@ -25,8 +28,10 @@ ENV NODE_ENV=production \
|
||||
PI_DOCKER=true
|
||||
|
||||
EXPOSE 80
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.15/community/ \
|
||||
vips ffmpeg
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.15/community/ ffmpeg
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/ vips>8.12.2-r3
|
||||
|
||||
|
||||
COPY --from=builder /app /app
|
||||
VOLUME ["/app/data/config", "/app/data/db", "/app/data/images", "/app/data/tmp"]
|
||||
HEALTHCHECK --interval=40s --timeout=30s --retries=3 --start-period=60s \
|
||||
|
Loading…
Reference in New Issue
Block a user