Merge pull request 'Add Docker deployment' (#1) from feat/docker-integration into main
Deploy / deploy (push) Canceled after 0s
CI / check-and-test (push) Canceled after 0s
CI / lo-roundtrip (push) Canceled after 0s
CI / browser (chromium, ubuntu-latest) (push) Canceled after 0s
CI / browser (firefox, ubuntu-latest) (push) Canceled after 0s
CI / browser (webkit, macos-latest) (push) Canceled after 0s

Add Docker deployment
This commit was merged in pull request #1.
This commit is contained in:
tom committed 2026-09-12 09:20:15 +00:00
commit 54020c93d0
5 files changed
+88

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
node_modules
dist
coverage
.vite
*.log
.env
.env.*
.DS_Store
+19
View File
@@ -0,0 +1,19 @@
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist/ /usr/share/nginx/html/
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
+35
View File
@@ -86,6 +86,41 @@ npm run build # production build → dist/
Built with Svelte 5, TypeScript, Vite and TipTap 3 (ProseMirror).
### Docker
The production image builds the static application with Node.js and serves it
with Nginx. No application server or persistent volume is required; documents
remain in the browser.
Build and run the image directly:
```bash
docker build -t edentext .
docker run --rm -p 127.0.0.1:8080:80 edentext
```
Then open <http://localhost:8080>.
Alternatively, use Docker Compose:
```bash
docker compose up --build -d
```
The Compose service binds EdenText to <http://localhost:8080> by default. To use
a different host port, set `EDENTEXT_PORT`, for example:
```bash
EDENTEXT_PORT=8081 docker compose up --build -d
```
Set `EDENTEXT_BIND_ADDRESS=0.0.0.0` to make the service reachable from other
machines. When finished, stop and remove it with:
```bash
docker compose down
```
## Contributing
Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Merging
+8
View File
@@ -0,0 +1,8 @@
services:
edentext:
build:
context: .
image: edentext:local
ports:
- "${EDENTEXT_BIND_ADDRESS:-127.0.0.1}:${EDENTEXT_PORT:-8080}:80"
restart: unless-stopped
+18
View File
@@ -0,0 +1,18 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
}