diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml new file mode 100644 index 0000000..e48b3fd --- /dev/null +++ b/.gitea/workflows/container.yaml @@ -0,0 +1,12 @@ +name: Build Multiarch Container Image +on: [push] +jobs: + call-reusable-workflow: + uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main + with: + repository: ${{ gitea.repository }} + ref_name: ${{ gitea.ref_name }} + sha: ${{ gitea.sha }} + registry_url: ${{ secrets.REGISTRY_URL }} + registry_user: ${{ secrets.REGISTRY_USER }} + registry_pw: ${{ secrets.REGISTRY_PW }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 3148d08..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -variables: - CONTAINER_NAME: thallian/wikijs - -build: - stage: build - image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] - script: - - mkdir -p /kaniko/.docker - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json - - >- - /kaniko/executor - --context "$CI_PROJECT_DIR" - --dockerfile "$CI_PROJECT_DIR/Dockerfile" - --destination "$CONTAINER_NAME:$CI_COMMIT_SHA" - --destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME" - --destination "$CONTAINER_NAME:latest" diff --git a/Dockerfile b/Containerfile similarity index 71% rename from Dockerfile rename to Containerfile index 080e8ac..44ad183 100644 --- a/Dockerfile +++ b/Containerfile @@ -1,33 +1,38 @@ -FROM alpine:3.15 as builder +FROM docker.io/alpine:3.19 as builder RUN apk add --no-cache \ - git \ - npm \ - bash \ - python3 \ - make + git \ + npm \ + bash \ + python3 \ + make \ + sed \ + g++ \ + musl-dev #ENV NODE_ENV=production # to get around errors from differing stack sizes in musl # https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread_stack_size -RUN npm config set unsafe-perm true +#RUN npm config set unsafe-perm true +ENV NODE_OPTIONS=--openssl-legacy-provider RUN npm install -g \ - webpack \ - webpack-cli \ - node-gyp + webpack \ + webpack-cli \ + node-gyp -ENV WIKIJS_VERSION=v2.5.275 +ENV WIKIJS_VERSION=v2.5.301 RUN git clone https://github.com/Requarks/wiki.git -b $WIKIJS_VERSION /build WORKDIR /build RUN npm install --legacy-peer-deps # don't know why this is needed here too, but what the hell -RUN npm install --save-dev webpack webpack-cli +RUN npm install --legacy-peer-deps --save-dev webpack webpack-cli RUN npx webpack --profile --config dev/webpack/webpack.prod.js +RUN sed -i '0,/.*"dev".*/s//"dev": false,/' package.json -FROM thallian/confd-env:latest +FROM docker.io/thallian/confd-env:3.19-3.1.6.2 ENV NODE_ENV=production @@ -42,9 +47,9 @@ COPY --from=builder --chown=wikijs:wikijs /build/config.sample.yml /home/wikijs/ COPY --from=builder --chown=wikijs:wikijs /build/package.json /home/wikijs/package.json RUN apk add --no-cache \ - nodejs \ - git \ - openssh-client + nodejs \ + git \ + openssh-client ADD /rootfs /