initial commit
This commit is contained in:
commit
f12a160a74
1 changed files with 33 additions and 0 deletions
33
Dockerfile
Normal file
33
Dockerfile
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Use Alpine as the base image
|
||||||
|
FROM node:22-alpine3.21 AS builder
|
||||||
|
|
||||||
|
# Set metadata (optional but good practice)
|
||||||
|
LABEL maintainer="you@example.com"
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
# get all the deps
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
ca-certificates \
|
||||||
|
openjdk21-jdk \
|
||||||
|
git \
|
||||||
|
curl
|
||||||
|
RUN curl -O https://download.clojure.org/install/linux-install-1.11.1.1435.sh && chmod +x linux-install-1.11.1.1435.sh && ./linux-install-1.11.1.1435.sh
|
||||||
|
RUN git clone https://github.com/logseq/logseq.git && cd logseq && yarn install
|
||||||
|
#build db-sync
|
||||||
|
RUN cd logseq/deps/db-sync && yarn install && yarn build:node-adapter && yarn install --production
|
||||||
|
#copy to /logseq-sync for final image
|
||||||
|
RUN cd logseq/deps/db-sync && mkdir -p /logseq-sync/worker && mv worker/dist /logseq-sync/worker && mv node_modules package.json yarn.lock start.sh /logseq-sync
|
||||||
|
|
||||||
|
#final image
|
||||||
|
FROM node:22-alpine3.21
|
||||||
|
COPY --from=builder /logseq-sync /logseq-sync
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash
|
||||||
|
|
||||||
|
WORKDIR /logseq-sync
|
||||||
|
|
||||||
|
EXPOSE 8787
|
||||||
|
|
||||||
|
# Default command
|
||||||
|
CMD ["bash", "start.sh"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue