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 ]
|
needs: [ create-release ]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
container: [ alpine, debian-stretch ]
|
container: [ debian-stretch ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set tag
|
- name: Set tag
|
||||||
@ -113,14 +113,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
- name: Test build on Pull request and test branches
|
- name: Build docker
|
||||||
if: ${{ startsWith(steps.vars.outputs.type , 'head') && ((github.event.issue.pull_request && github.ref == 'refs/heads/master') || github.ref != 'refs/heads/master') }}
|
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: docker/${{ matrix.container }}/Dockerfile.build
|
file: docker/${{ matrix.container }}/Dockerfile.build
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
- name: Build experimental
|
- name: Push experimental
|
||||||
if: ${{ github.ref == 'refs/heads/experimental' }}
|
if: ${{ github.ref == 'refs/heads/experimental' }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -129,7 +128,7 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: bpatrik/pigallery2:experimental-${{ matrix.container }}
|
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' }}
|
if: ${{ startsWith(steps.vars.outputs.type , 'head') && !github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -138,7 +137,7 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: bpatrik/pigallery2:nightly-${{ matrix.container }}
|
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 }}
|
if: ${{ startsWith(steps.vars.outputs.type , 'tag') && !github.event.issue.pull_request }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -155,7 +154,7 @@ jobs:
|
|||||||
needs: [ create-release ]
|
needs: [ create-release ]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
container: [ debian-buster ]
|
container: [alpine, debian-buster ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set tag
|
- name: Set tag
|
||||||
@ -176,14 +175,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
- name: Test build on Pull request and test branches
|
- name: Build docker
|
||||||
if: ${{ startsWith(steps.vars.outputs.type , 'head') && ((github.event.issue.pull_request && github.ref == 'refs/heads/master') || github.ref != 'refs/heads/master') }}
|
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: docker/${{ matrix.container }}/Dockerfile.build
|
file: docker/${{ matrix.container }}/Dockerfile.build
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
- name: Build experimental
|
- name: Push experimental
|
||||||
if: ${{ github.ref == 'refs/heads/experimental' }}
|
if: ${{ github.ref == 'refs/heads/experimental' }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -192,7 +190,7 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: bpatrik/pigallery2:experimental-${{ matrix.container }}
|
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' }}
|
if: ${{ startsWith(steps.vars.outputs.type , 'head') && !github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -201,7 +199,7 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: bpatrik/pigallery2:nightly-${{ matrix.container }}
|
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 }}
|
if: ${{ startsWith(steps.vars.outputs.type , 'tag') && !github.event.issue.pull_request }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:14-alpine3.15 AS builder
|
FROM node:14-alpine3.15 AS builder
|
||||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.15/community/ \
|
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
|
COPY pigallery2-release /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm install --unsafe-perm
|
RUN npm install --unsafe-perm
|
||||||
@ -25,8 +28,10 @@ ENV NODE_ENV=production \
|
|||||||
PI_DOCKER=true
|
PI_DOCKER=true
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.15/community/ \
|
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.15/community/ ffmpeg
|
||||||
vips 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
|
COPY --from=builder /app /app
|
||||||
VOLUME ["/app/data/config", "/app/data/db", "/app/data/images", "/app/data/tmp"]
|
VOLUME ["/app/data/config", "/app/data/db", "/app/data/images", "/app/data/tmp"]
|
||||||
HEALTHCHECK --interval=40s --timeout=30s --retries=3 --start-period=60s \
|
HEALTHCHECK --interval=40s --timeout=30s --retries=3 --start-period=60s \
|
||||||
|
Loading…
Reference in New Issue
Block a user