mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Adding debian buster and node v14 support
This commit is contained in:
parent
ca08cea126
commit
e54bab2976
77
.github/workflows/build.yml
vendored
77
.github/workflows/build.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 13.x]
|
||||
node-version: [12.x, 13.x, 14.x]
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
@ -92,8 +92,8 @@ jobs:
|
||||
-
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: pigallery2-release
|
||||
path: pigallery2-release
|
||||
name: pigallery2-release
|
||||
path: pigallery2-release
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@ -102,10 +102,10 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
-
|
||||
name: Build and push alpine nightly
|
||||
if: startsWith(steps.vars.outputs.type , 'head')
|
||||
@ -115,7 +115,7 @@ jobs:
|
||||
file: docker/alpine/Dockerfile.build
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:nightly-alpine
|
||||
tags: bpatrik/pigallery2:nightly-alpine
|
||||
-
|
||||
name: Build and push alpine release
|
||||
if: startsWith(steps.vars.outputs.type , 'tag')
|
||||
@ -145,8 +145,8 @@ jobs:
|
||||
-
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: pigallery2-release
|
||||
path: pigallery2-release
|
||||
name: pigallery2-release
|
||||
path: pigallery2-release
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@ -155,12 +155,12 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
-
|
||||
name: Build and push debian stretch nightly
|
||||
name: Build and push debian stretch nightly
|
||||
if: startsWith(steps.vars.outputs.type , 'head')
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -168,7 +168,7 @@ jobs:
|
||||
file: docker/debian-stretch/Dockerfile.build
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:nightly-stretch
|
||||
tags: bpatrik/pigallery2:nightly-stretch
|
||||
-
|
||||
name: Build and push debian stretch release
|
||||
if: startsWith(steps.vars.outputs.type , 'tag')
|
||||
@ -182,5 +182,58 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
bpatrik/pigallery2:nightly-stretch
|
||||
bpatrik/pigallery2:$RELEASE_VERSION-stretch
|
||||
bpatrik/pigallery2:latest-stretch
|
||||
build-buster:
|
||||
runs-on: [ubuntu-latest]
|
||||
needs: [create-release]
|
||||
steps:
|
||||
-
|
||||
name: Set tag
|
||||
id: vars
|
||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) && echo ::set-output name=type::$(echo ${GITHUB_REF:5})
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: pigallery2-release
|
||||
path: pigallery2-release
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
-
|
||||
name: Build and push debian buster nightly
|
||||
if: startsWith(steps.vars.outputs.type , 'head')
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/debian-stretch/Dockerfile.build
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: bpatrik/pigallery2:nightly-buster
|
||||
-
|
||||
name: Build and push debian buster release
|
||||
if: startsWith(steps.vars.outputs.type , 'tag')
|
||||
env:
|
||||
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/debian-buster/Dockerfile.build
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
bpatrik/pigallery2:nightly-buster
|
||||
bpatrik/pigallery2:$RELEASE_VERSION
|
||||
bpatrik/pigallery2:latest
|
||||
|
@ -1,9 +1,9 @@
|
||||
dist: xenial
|
||||
language: node_js
|
||||
node_js:
|
||||
- '10'
|
||||
- '12'
|
||||
- '13'
|
||||
- '14'
|
||||
env:
|
||||
- PORT=35000 MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test'
|
||||
services:
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:12-alpine3.11 AS builder
|
||||
FROM node:14-alpine3.11 AS builder
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.11/community/ \
|
||||
python build-base sqlite-dev sqlite-libs vips-dev fftw-dev gcc g++ make libc6-compat
|
||||
COPY pigallery2-release /app
|
||||
@ -14,7 +14,7 @@ RUN mkdir -p /app/data/config && \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:12-alpine3.11 AS main
|
||||
FROM node:14-alpine3.11 AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
39
docker/debian-buster/Dockerfile.build
Normal file
39
docker/debian-buster/Dockerfile.build
Normal file
@ -0,0 +1,39 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:14-buster AS builder
|
||||
COPY pigallery2-release /app
|
||||
WORKDIR /app
|
||||
RUN npm install --unsafe-perm
|
||||
RUN mkdir -p /app/data/config && \
|
||||
mkdir -p /app/data/db && \
|
||||
mkdir -p /app/data/images && \
|
||||
mkdir -p /app/data/tmp
|
||||
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:14-buster-slim AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
default-Server-Database-dbFolder=/app/data/db \
|
||||
default-Server-Media-folder=/app/data/images \
|
||||
default-Server-Media-tempFolder=/app/data/tmp \
|
||||
# flagging dockerized environemnt
|
||||
PI_DOCKER=true
|
||||
|
||||
EXPOSE 80
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates wget ffmpeg \
|
||||
&& apt-get clean -q -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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 \
|
||||
CMD wget --quiet --tries=1 --no-check-certificate --spider \
|
||||
http://localhost:80/heartbeat || exit 1
|
||||
|
||||
# after a extensive job (like video converting), pigallery calls gc, to clean up everthing as fast as possible
|
||||
# Exec form entrypoint is need otherwise (using shell form) ENV variables are not properly passed down to the app
|
||||
ENTRYPOINT ["node", "./src/backend/index", "--expose-gc", "--config-path=/app/data/config/config.json"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:12-stretch AS builder
|
||||
FROM node:14-stretch AS builder
|
||||
COPY pigallery2-release /app
|
||||
WORKDIR /app
|
||||
RUN npm install --unsafe-perm
|
||||
@ -12,7 +12,7 @@ RUN mkdir -p /app/data/config && \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:12-stretch-slim AS main
|
||||
FROM node:14-stretch-slim AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:12-stretch AS builder
|
||||
FROM node:14-buster AS builder
|
||||
# LABEL maintainer="Patrik J. Braun"
|
||||
# copying only package{-lock}.json to make node_modules cachable
|
||||
RUN git clone https://github.com/bpatrik/pigallery2.git /build
|
||||
@ -16,7 +16,7 @@ RUN npm install --unsafe-perm \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:12-stretch-slim AS main
|
||||
FROM node:14-buster-slim AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
Loading…
Reference in New Issue
Block a user