2021-03-11 07:01:15 +00:00
|
|
|
# NOTE: please keep it in sync with .github pipelines
|
2023-01-18 05:05:23 +00:00
|
|
|
# NOTE: during testing make sure to change the branch below
|
|
|
|
# NOTE: before runing the build-docker GH action edit
|
|
|
|
# build-docker.yml and change the release channel to testing
|
2021-12-27 05:53:28 +00:00
|
|
|
|
|
|
|
# Builder image
|
|
|
|
FROM clojure:openjdk-11-tools-deps-1.10.1.727 as builder
|
|
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2020-12-21 11:07:17 +00:00
|
|
|
|
2021-11-17 05:01:32 +00:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
|
2020-12-21 11:07:17 +00:00
|
|
|
apt-get install -y nodejs
|
|
|
|
|
2021-11-22 01:48:28 +00:00
|
|
|
RUN apt-get update && apt-get install ca-certificates && \
|
|
|
|
wget --no-check-certificate -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
2020-12-21 11:07:17 +00:00
|
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
2023-01-18 04:54:56 +00:00
|
|
|
apt-get update && apt-get install -y yarn
|
2020-12-21 11:07:17 +00:00
|
|
|
|
2023-01-18 04:54:56 +00:00
|
|
|
WORKDIR /data
|
2021-12-27 05:53:28 +00:00
|
|
|
|
2023-01-18 05:13:21 +00:00
|
|
|
RUN git clone -b fix/docker-bulid-timeout https://github.com/logseq/logseq.git .
|
|
|
|
|
|
|
|
RUN yarn install --network-timeout 100000
|
|
|
|
|
2023-01-18 05:05:23 +00:00
|
|
|
# Build static resources
|
2023-01-18 05:13:21 +00:00
|
|
|
RUN gulp build && yarn cljs:release
|
2021-12-27 05:53:28 +00:00
|
|
|
|
|
|
|
# Web App Runner image
|
|
|
|
FROM nginx:stable-alpine
|
2020-12-21 11:07:17 +00:00
|
|
|
|
2023-01-18 04:54:56 +00:00
|
|
|
COPY --from=builder /data/static /usr/share/nginx/html
|
2020-12-21 11:07:17 +00:00
|
|
|
|