diff options
| author | eltrac <hi@eltr.ac> | 2026-10-30 15:06:48 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-10-30 15:06:57 +0800 |
| commit | d3cfa371cc57b50009cac59018b6a539e34b558d (patch) | |
| tree | 5c655edba144b490654d68308d3658ea2c686329 /doc/manual/installation.md | |
| parent | 092b09fa6300453e84f60975b04ed5788d9b87ab (diff) | |
doc: move Dockerfile and docker-compose.yml to doc
Diffstat (limited to 'doc/manual/installation.md')
| -rw-r--r-- | doc/manual/installation.md | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/doc/manual/installation.md b/doc/manual/installation.md index 13b17bf..6db3199 100644 --- a/doc/manual/installation.md +++ b/doc/manual/installation.md @@ -180,17 +180,58 @@ sudo systemctl stop weepinbell ### Docker
-> [!warning]
-> The `Dockerfile` is not actively tested.
+Example `Dockerfile`:
+
+```Dockerfile
+FROM clojure:lein-alpine AS builder
+
+WORKDIR /app
+COPY project.clj /app/
+RUN lein deps
+
+COPY . /app
+RUN lein uberjar && \
+ cp target/default+uberjar/*-standalone.jar ./app.jar || \
+ cp target/*-standalone.jar ./app.jar
+
+FROM eclipse-temurin:21-jre-alpine
-[Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml) are included in the repository.
+WORKDIR /app
+COPY --from=builder /app/app.jar ./weepinbell.jar
+
+EXPOSE 3000
+CMD ["java", "-jar", "weepinbell.jar"]
+```
+
+Example `docker-compose.yml`:
+
+```yaml
+services:
+ weepinbell:
+ build: .
+ container_name: weepinbell
+ ports:
+ - "5432:3000"
+ volumes:
+ - ./config.edn:/app/config.edn:ro
+ - ./data:/app/data
+ environment:
+ - PORT=3000
+ restart: always
+```
+
+Start using `docker compose`:
```shell
-git clone https://codeberg.org/eltrac/weepinbell
-cd weepinbell
docker compose up -d
```
+To stop weepinbell:
+
+```shell
+docker compose down
+```
+
Podman should work as well, but it's not tested.
## 4. Set up web server
|
