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
|
2023-02-20 11:44:01 +00:00
|
|
|
# NOTE: before running the build-docker GH action edit
|
2023-01-18 22:15:31 +00:00
|
|
|
# build-docker.yml and change the release channel from :latest to :testing
|
2021-12-27 05:53:28 +00:00
|
|
|
|
|
|
|
# Builder image
|
2023-01-19 20:41:29 +00:00
|
|
|
FROM clojure:temurin-11-tools-deps-1.11.1.1208-bullseye-slim as builder
|
2021-12-27 05:53:28 +00:00
|
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2020-12-21 11:07:17 +00:00
|
|
|
|
2023-01-19 20:41:29 +00:00
|
|
|
# Install reqs
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
curl \
|
|
|
|
ca-certificates \
|
|
|
|
apt-transport-https \
|
|
|
|
gpg
|
2020-12-21 11:07:17 +00:00
|
|
|
|
2023-01-19 20:41:29 +00:00
|
|
|
# install NodeJS & yarn
|
2023-02-21 15:07:35 +00:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
|
2023-01-19 20:41:29 +00:00
|
|
|
|
|
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | \
|
|
|
|
tee /etc/apt/trusted.gpg.d/yarn.gpg && \
|
|
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
|
|
|
|
tee /etc/apt/sources.list.d/yarn.list && \
|
|
|
|
apt-get update && apt-get install -y nodejs 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-19 20:41:29 +00:00
|
|
|
# build Logseq static resources
|
2023-01-18 22:15:31 +00:00
|
|
|
RUN git clone -b master https://github.com/logseq/logseq.git .
|
2023-01-18 05:13:21 +00:00
|
|
|
|
2023-01-19 15:25:25 +00:00
|
|
|
RUN yarn config set network-timeout 240000 -g && yarn install
|
2023-01-18 05:13:21 +00:00
|
|
|
|
2023-01-18 05:19:59 +00:00
|
|
|
RUN yarn release
|
2021-12-27 05:53:28 +00:00
|
|
|
|
|
|
|
# Web App Runner image
|
2023-04-18 21:13:59 +00:00
|
|
|
FROM nginx:1.24.0-alpine3.17
|
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
|
|
|
|