Move code server, add karakeep

This commit is contained in:
whitney 2025-05-19 23:22:40 -07:00
parent 9362dfdc5e
commit bad1fc817e
9 changed files with 104 additions and 1 deletions

3
productivity/karakeep/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
karakeep.env
meili.env

View File

@ -0,0 +1,37 @@
# Karakeep
An AI powered notes, bookmarks, everything knowledge base.
## Setup
### General
1. (If not using checked in Dockerfile) Use the Dockerfile from Karakeep:
```
wget https://raw.githubusercontent.com/karakeep-app/karakeep/main/docker/docker-compose.yml
```
2. This is what I changed from their base Dockerfile to get a runnable container when you checkout the repo:
- Convert exposed ports to traefik labels for the main container.
- Introduce Traefik network + create karakeep network for the containers to talk on.
- Convert volumes to bind mounts on disk.
- Convert to using env files instead of manually providing env vars. For some reason the dockerfile mixes use of explicit vars and .env file. Weird
3. Create Env files
Copy `planka.env.example` to `planka.env`, and `planka-db.env.example` to `planka-db.env` and fill with data, observing the following:
- Update `BASE_URL` to point to vanity URL. Optionally generate a `SECRET_KEY` as well.
- The `POSTGRES_DB` value in `planka-db.env` should match the database specified by `DATABASE_URL` in `planka.env`.
4. Start just the db
```
docker compose up -d postgres
```
5. Create Admin User
```
docker compose run --rm planka npm run db:create-admin-user
```
6. Start the rest of Dockerfile
```
docker compose up -d
```

View File

@ -0,0 +1,52 @@
networks:
traefik:
external: true
karakeep:
driver: bridge
services:
web:
image: ghcr.io/karakeep-app/karakeep:release
container_name: karakeep
restart: unless-stopped
volumes:
- /pwspool/software/karakeep/data:/data
env_file:
- karakeep.env
networks:
- karakeep
- traefik
labels:
- traefik.http.routers.karakeep.rule=Host(`kb.whitney.rip`)
- traefik.http.routers.karakeep.tls=true
- traefik.http.routers.karakeep.tls.certresolver=lets-encrypt
- traefik.http.services.karakeep.loadbalancer.server.port=3000
chrome:
image: gcr.io/zenika-hub/alpine-chrome:latest
container_name: karakeep-chrome
restart: unless-stopped
networks:
- karakeep
command:
- --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- --remote-debugging-address=0.0.0.0
- --remote-debugging-port=9222
- --hide-scrollbars
meilisearch:
image: getmeili/meilisearch:latest
container_name: karakeep-meili
restart: unless-stopped
env_file:
- meili.env
networks:
- karakeep
volumes:
- meilisearch:/meili_data
volumes:
meilisearch:
data:

View File

@ -0,0 +1,8 @@
# Karakeep Env Vars
NEXTAUTH_SECRET=random_secret_1
NEXTAUTH_URL=https://subdomain.example.com
MEILI_ADDR=http://meilisearch:7700
BROWSER_WEB_URL=http://chrome:9222
# OPENAI_API_KEY=
DATA_DIR=/data # DON'T CHANGE THIS
DISABLE_SIGNUPS=true # Leave false for first time setup to create admin

View File

@ -0,0 +1,3 @@
# Meili Env Vars
MEILI_MASTER_KEY=random_secret_2
MEILI_NO_ANALYTICS=true

View File

@ -8,7 +8,7 @@ declare -a CONTAINERS=(
"media/plex"
"media/transmission"
"misc/homepage"
"software-development/code-server"
"productivity/code-server"
"software-development/grafana"
"software-development/traefik"
)