Compare commits

...

2 Commits

Author SHA1 Message Date
bad1fc817e Move code server, add karakeep 2025-05-19 23:22:40 -07:00
9362dfdc5e Add Planka POC 2025-05-19 17:17:37 -07:00
14 changed files with 198 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

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

@ -0,0 +1,3 @@
planka.env
planka-db.env

View File

@ -0,0 +1,37 @@
# Planka
Self hosted Kanban organizer.
## Setup
### General
1. (If not using checked in Dockerfile) Use the Dockerfile from Planka:
```
curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-compose.yml -o ./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 planka 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.
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,46 @@
networks:
traefik:
external: true
planka:
driver: bridge
services:
planka:
image: ghcr.io/plankanban/planka:2.0.0-rc.2
container_name: planka
restart: on-failure
networks:
- planka
- traefik
volumes:
- /pwspool/software/planka/favicons:/app/public/favicons
- /pwspool/software/planka/user-avatars:/app/public/user-avatars
- /pwspool/software/planka/background-images:/app/public/background-images
- /pwspool/software/planka/attachments:/app/private/attachments
env_file:
- planka.env
depends_on:
postgres:
condition: service_healthy
labels:
- traefik.http.routers.planka.rule=Host(`todo.whitney.rip`)
- traefik.http.routers.planka.tls=true
- traefik.http.routers.planka.tls.certresolver=lets-encrypt
- traefik.http.services.planka.loadbalancer.server.port=1337
postgres:
image: postgres:16-alpine
container_name: planka-db
restart: on-failure
networks:
- planka
volumes:
- /pwspool/software/planka/data:/var/lib/postgresql/data
env_file:
- planka-db.env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
interval: 10s
timeout: 5s
retries: 5

View File

@ -0,0 +1,3 @@
# Planka DB Env Vars
POSTGRES_DB=planka
POSTGRES_HOST_AUTH_METHOD=trust

View File

@ -0,0 +1,5 @@
# Planka Env Vars
BASE_URL=https://subdomain.example.com
DATABASE_URL=postgresql://postgres@postgres/planka
SECRET_KEY=notsecretkey
LOG_LEVEL=warn

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"
)