Compare commits
No commits in common. "24ebbd9056571b56de96198dd5fb8bbc3f783439" and "08a530c78f3935fc7c05ef7e0b6bdd4c30c8dc1a" have entirely different histories.
24ebbd9056
...
08a530c78f
5 changed files with 0 additions and 72 deletions
|
|
@ -1,9 +0,0 @@
|
||||||
.git
|
|
||||||
.claude
|
|
||||||
node_modules
|
|
||||||
.svelte-kit
|
|
||||||
build
|
|
||||||
memos
|
|
||||||
Dockerfile
|
|
||||||
compose.yaml
|
|
||||||
*.md
|
|
||||||
14
Dockerfile
14
Dockerfile
|
|
@ -1,14 +0,0 @@
|
||||||
# Build the static PWA, then serve it with nginx.
|
|
||||||
|
|
||||||
FROM node:24-alpine AS build
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json package-lock.json ./
|
|
||||||
RUN npm ci
|
|
||||||
COPY . .
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM nginx:1.29-alpine
|
|
||||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
|
||||||
COPY --from=build /app/build /usr/share/nginx/html
|
|
||||||
EXPOSE 80
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO /dev/null http://127.0.0.1/ || exit 1
|
|
||||||
|
|
@ -12,14 +12,6 @@ npm run check # type-check
|
||||||
npm run build # static PWA in build/ — serve it from any static host (HTTPS for PWA install)
|
npm run build # static PWA in build/ — serve it from any static host (HTTPS for PWA install)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker compose up -d --build # http://localhost:8080 (set PAPURE_PORT to change)
|
|
||||||
```
|
|
||||||
|
|
||||||
The image builds the PWA and serves it with nginx. Put an HTTPS reverse proxy in front of it: installing the PWA and the offline service worker both need HTTPS. To update, `git pull` and run the same command again.
|
|
||||||
|
|
||||||
## Using it
|
## Using it
|
||||||
|
|
||||||
- **Tools** (bottom bar): Text `T`, Pen `P`, Highlighter `H`, Eraser `E`, Import PDF, Undo/Redo, zoom. The pen's eraser end erases too.
|
- **Tools** (bottom bar): Text `T`, Pen `P`, Highlighter `H`, Eraser `E`, Import PDF, Undo/Redo, zoom. The pen's eraser end erases too.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
services:
|
|
||||||
papure:
|
|
||||||
build: .
|
|
||||||
image: papure
|
|
||||||
restart: unless-stopped
|
|
||||||
# Put an HTTPS reverse proxy in front: the PWA install and service worker need HTTPS.
|
|
||||||
ports:
|
|
||||||
- "${PAPURE_PORT:-8080}:80"
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name _;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_types text/css application/javascript application/json application/manifest+json image/svg+xml;
|
|
||||||
|
|
||||||
# Hashed build output never changes.
|
|
||||||
location /_app/immutable/ {
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
||||||
try_files $uri =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# The service worker and app shell must be re-checked so updates reach clients.
|
|
||||||
location = /service-worker.js {
|
|
||||||
add_header Cache-Control "no-cache";
|
|
||||||
try_files $uri =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# nginx's default MIME table has no entry for the PWA manifest.
|
|
||||||
location ~ \.webmanifest$ {
|
|
||||||
types { }
|
|
||||||
default_type application/manifest+json;
|
|
||||||
add_header Cache-Control "no-cache";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Client-side app: unknown paths fall back to the SPA shell.
|
|
||||||
location / {
|
|
||||||
add_header Cache-Control "no-cache";
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue