diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa54893..7b91245 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Set up go 1.18 - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: 1.18 id: go diff --git a/.history/Dockerfile_20231013141239 b/.history/Dockerfile_20231013141239 deleted file mode 100644 index 37e6b93..0000000 --- a/.history/Dockerfile_20231013141239 +++ /dev/null @@ -1,58 +0,0 @@ -FROM golang:1.20-alpine as backend - -ARG GIT_BRANCH -ARG GITHUB_SHA -ARG CI - -ENV GOFLAGS="-mod=vendor" -ENV CGO_ENABLED=0 -ENV GOOS=linux - -ADD . /build -WORKDIR /build - -RUN apk add --no-cache --update git tzdata ca-certificates - -RUN \ - if [ -z "$CI" ] ; then \ - echo "runs outside of CI" && version=$(git rev-parse --abbrev-ref HEAD)-$(git log -1 --format=%h)-$(date +%Y%m%dT%H:%M:%S); \ - else version=${GIT_BRANCH}-${GITHUB_SHA:0:7}-$(date +%Y%m%dT%H:%M:%S); fi && \ - echo "version=$version" && \ - cd app && go build -o /build/doku -ldflags "-X main.revision=${version} -s -w" - - -FROM node:16.14.2-alpine as build-frontend - -ARG NODE_ENV=production -ARG CI=true - -ADD web/doku /srv/frontend -WORKDIR /srv/frontend - -RUN rm -f /srv/frontend/.eslintrc.json && \ - apk update && \ - apk add zip make gcc g++ python3 && \ - yarn install --immutable --network-timeout 100000 && \ - yarn semantic-ui-css-patch && \ - yarn build -CMD yarn run test - - -FROM ghcr.io/umputun/baseimage/app:v1.11 as base - -FROM scratch - -ENV DOKU_IN_DOCKER=1 - -COPY --from=backend /build/doku /srv/doku -COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo -COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=base /etc/passwd /etc/passwd -COPY --from=base /etc/group /etc/group -COPY --from=build-frontend /srv/frontend/build/static /srv/web/static -COPY --from=build-frontend /srv/frontend/build/favicon.ico /srv/web/static -COPY --from=build-frontend /srv/frontend/build/index.html /srv/web/static -COPY --from=build-frontend /srv/frontend/build/manifest.json /srv/web/static - -WORKDIR /srv -ENTRYPOINT ["/srv/doku"] diff --git a/.history/Dockerfile_20231013141650 b/.history/Dockerfile_20231013141650 deleted file mode 100644 index 6fe0524..0000000 --- a/.history/Dockerfile_20231013141650 +++ /dev/null @@ -1,58 +0,0 @@ -FROM golang:1.20-alpine as backend - -ARG GIT_BRANCH -ARG GITHUB_SHA -ARG CI - -ENV GOFLAGS="-mod=vendor" -ENV CGO_ENABLED=0 -ENV GOOS=linux - -ADD . /build -WORKDIR /build - -RUN apk add --no-cache --update git tzdata ca-certificates - -RUN \ - if [ -z "$CI" ] ; then \ - echo "runs outside of CI" && version=$(git rev-parse --abbrev-ref HEAD)-$(git log -1 --format=%h)-$(date +%Y%m%dT%H:%M:%S); \ - else version=${GIT_BRANCH}-${GITHUB_SHA:0:7}-$(date +%Y%m%dT%H:%M:%S); fi && \ - echo "version=$version" && \ - cd app && go build -o /build/doku -ldflags "-X main.revision=${version} -s -w" - - -FROM node:16.20-alpine as build-frontend - -ARG NODE_ENV=production -ARG CI=true - -ADD web/doku /srv/frontend -WORKDIR /srv/frontend - -RUN rm -f /srv/frontend/.eslintrc.json && \ - apk update && \ - apk add zip make gcc g++ python3 && \ - yarn install --immutable --network-timeout 100000 && \ - yarn semantic-ui-css-patch && \ - yarn build -CMD yarn run test - - -FROM ghcr.io/umputun/baseimage/app:v1.11 as base - -FROM scratch - -ENV DOKU_IN_DOCKER=1 - -COPY --from=backend /build/doku /srv/doku -COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo -COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=base /etc/passwd /etc/passwd -COPY --from=base /etc/group /etc/group -COPY --from=build-frontend /srv/frontend/build/static /srv/web/static -COPY --from=build-frontend /srv/frontend/build/favicon.ico /srv/web/static -COPY --from=build-frontend /srv/frontend/build/index.html /srv/web/static -COPY --from=build-frontend /srv/frontend/build/manifest.json /srv/web/static - -WORKDIR /srv -ENTRYPOINT ["/srv/doku"] diff --git a/.history/Dockerfile_20231013141739 b/.history/Dockerfile_20231013141739 deleted file mode 100644 index 6fe0524..0000000 --- a/.history/Dockerfile_20231013141739 +++ /dev/null @@ -1,58 +0,0 @@ -FROM golang:1.20-alpine as backend - -ARG GIT_BRANCH -ARG GITHUB_SHA -ARG CI - -ENV GOFLAGS="-mod=vendor" -ENV CGO_ENABLED=0 -ENV GOOS=linux - -ADD . /build -WORKDIR /build - -RUN apk add --no-cache --update git tzdata ca-certificates - -RUN \ - if [ -z "$CI" ] ; then \ - echo "runs outside of CI" && version=$(git rev-parse --abbrev-ref HEAD)-$(git log -1 --format=%h)-$(date +%Y%m%dT%H:%M:%S); \ - else version=${GIT_BRANCH}-${GITHUB_SHA:0:7}-$(date +%Y%m%dT%H:%M:%S); fi && \ - echo "version=$version" && \ - cd app && go build -o /build/doku -ldflags "-X main.revision=${version} -s -w" - - -FROM node:16.20-alpine as build-frontend - -ARG NODE_ENV=production -ARG CI=true - -ADD web/doku /srv/frontend -WORKDIR /srv/frontend - -RUN rm -f /srv/frontend/.eslintrc.json && \ - apk update && \ - apk add zip make gcc g++ python3 && \ - yarn install --immutable --network-timeout 100000 && \ - yarn semantic-ui-css-patch && \ - yarn build -CMD yarn run test - - -FROM ghcr.io/umputun/baseimage/app:v1.11 as base - -FROM scratch - -ENV DOKU_IN_DOCKER=1 - -COPY --from=backend /build/doku /srv/doku -COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo -COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=base /etc/passwd /etc/passwd -COPY --from=base /etc/group /etc/group -COPY --from=build-frontend /srv/frontend/build/static /srv/web/static -COPY --from=build-frontend /srv/frontend/build/favicon.ico /srv/web/static -COPY --from=build-frontend /srv/frontend/build/index.html /srv/web/static -COPY --from=build-frontend /srv/frontend/build/manifest.json /srv/web/static - -WORKDIR /srv -ENTRYPOINT ["/srv/doku"]