Compare commits
No commits in common. "3f528a05fe1b78dc2966f8c461765b4f027d1c73" and "a65a872a83975245e0fbec0d5f5b7e19b5551003" have entirely different histories.
3f528a05fe
...
a65a872a83
3 changed files with 7 additions and 48 deletions
28
Dockerfile
28
Dockerfile
|
|
@ -9,36 +9,20 @@ WORKDIR /build
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
openjdk21-jre-headless \
|
openjdk21-jdk \
|
||||||
git \
|
git \
|
||||||
curl
|
curl
|
||||||
RUN curl -LO https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh \
|
#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
|
||||||
&& chmod +x linux-install.sh \
|
RUN curl -LO https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh && chmod +x linux-install.sh && ./linux-install.sh
|
||||||
&& ./linux-install.sh
|
RUN git clone https://github.com/logseq/logseq.git && cd logseq && yarn install
|
||||||
RUN git clone https://github.com/logseq/logseq.git --depth 1 \
|
|
||||||
&& cd logseq \
|
|
||||||
&& yarn install
|
|
||||||
WORKDIR /build/logseq
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
|
||||||
&& git config --global user.email "builder@local" \
|
|
||||||
&& git config --global user.name "Docker Builder" \
|
|
||||||
&& git remote add 4shutosh https://github.com/4shutosh/logseq.git \
|
|
||||||
&& git fetch 4shutosh self_host/21_march_2026 \
|
|
||||||
&& git cherry-pick 477061ffb
|
|
||||||
WORKDIR /build/logseq/deps/db-sync
|
|
||||||
#build db-sync
|
#build db-sync
|
||||||
RUN yarn install \
|
RUN cd logseq/deps/db-sync && yarn install && yarn build:node-adapter && yarn install --production
|
||||||
&& yarn build:node-adapter \
|
|
||||||
&& yarn install --production
|
|
||||||
#copy to /logseq-sync for final image
|
#copy to /logseq-sync for final image
|
||||||
RUN mkdir -p /logseq-sync/worker \
|
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
|
||||||
&& mv worker/dist /logseq-sync/worker \
|
|
||||||
&& mv node_modules package.json yarn.lock start.sh /logseq-sync
|
|
||||||
|
|
||||||
#final image
|
#final image
|
||||||
FROM node:22-alpine3.21
|
FROM node:22-alpine3.21
|
||||||
COPY --from=builder /logseq-sync /logseq-sync
|
COPY --from=builder /logseq-sync /logseq-sync
|
||||||
COPY start.sh /logseq-sync
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
curl
|
curl
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,14 @@
|
||||||
services:
|
services:
|
||||||
logseq-sync:
|
logseq-sync:
|
||||||
environment:
|
|
||||||
DB_SYNC_LOG_LEVEL: "debug"
|
|
||||||
container_name: logseq-sync
|
container_name: logseq-sync
|
||||||
image: "codeberg.org/kellya/logseq-sync:latest"
|
image: "codeberg.org/kellya/logseq-sync:latest"
|
||||||
ports:
|
ports:
|
||||||
- 8787:8787
|
- 8787:8787
|
||||||
- 8788:8788
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/logseq-sync/data
|
- ./data:/logseq-sync/data
|
||||||
# or use a named volume and uncomment the volume section below
|
# or use a named volume and uncomment the volume section below
|
||||||
# - data:/logseq-sync/data
|
# - data:/logseq-sync/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
#volumes:
|
#volumes:
|
||||||
# data:
|
# data:
|
||||||
|
|
|
||||||
23
nginx.conf
23
nginx.conf
|
|
@ -1,23 +0,0 @@
|
||||||
map $http_upgrade $connection_upgrade {
|
|
||||||
default upgrade;
|
|
||||||
'' close;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
server_name sync.yourdomain.com;
|
|
||||||
client_max_body_size 100M;
|
|
||||||
location / {
|
|
||||||
proxy_pass http://127.0.0.1:8787;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $connection_upgrade;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_read_timeout 86400s;
|
|
||||||
proxy_send_timeout 86400s;
|
|
||||||
}
|
|
||||||
listen 80;
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue