diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml deleted file mode 100644 index e48b3fd..0000000 --- a/.gitea/workflows/container.yaml +++ /dev/null @@ -1,12 +0,0 @@ -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 new file mode 100644 index 0000000..3148d08 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +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/Containerfile b/Dockerfile similarity index 71% rename from Containerfile rename to Dockerfile index 44ad183..080e8ac 100644 --- a/Containerfile +++ b/Dockerfile @@ -1,38 +1,33 @@ -FROM docker.io/alpine:3.19 as builder +FROM alpine:3.15 as builder RUN apk add --no-cache \ - git \ - npm \ - bash \ - python3 \ - make \ - sed \ - g++ \ - musl-dev + git \ + npm \ + bash \ + python3 \ + make #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 -ENV NODE_OPTIONS=--openssl-legacy-provider +RUN npm config set unsafe-perm true RUN npm install -g \ - webpack \ - webpack-cli \ - node-gyp + webpack \ + webpack-cli \ + node-gyp -ENV WIKIJS_VERSION=v2.5.301 +ENV WIKIJS_VERSION=v2.5.275 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 --legacy-peer-deps --save-dev webpack webpack-cli +RUN npm install --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 docker.io/thallian/confd-env:3.19-3.1.6.2 +FROM thallian/confd-env:latest ENV NODE_ENV=production @@ -47,9 +42,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 /