add docker instructions

cleanup docker compose
This commit is contained in:
theycallhermax 2025-03-01 02:35:02 -05:00
parent dc6b4f7712
commit 252e9879ef
No known key found for this signature in database
GPG key ID: 24D2803F3E25BF2D
2 changed files with 36 additions and 2 deletions

View file

@ -31,7 +31,7 @@ services:
- "8000:8000"
restart: always
volumes:
- emoji-data:/catask/static/emojis
- catask-data:/catask/static/emojis
- ./config.json:/catask/config.json
- ./.env:/catask/.env
@ -41,4 +41,4 @@ networks:
volumes:
db-data:
emoji-data:
catask-data:

34
docker.md Normal file
View file

@ -0,0 +1,34 @@
# CatAsk on Docker (or Podman)
## Prerequisites
- Docker + `docker-compose` (or Podman + `podman-compose`)
## Steps
Before starting CatAsk, you must copy the configuration files to their proper places first:
```sh
cp config.example.json config.json
cp .env.example .env
```
Then, paste this into the `.env` file, and replace sections that are marked with `[CHANGE THIS]`.
```env
DB_HOST = postgres
DB_NAME = catask
DB_USER = catask
DB_PASS = catask
DB_PORT = 5432
ADMIN_PASSWORD = [CHANGE THIS]
APP_SECRET = [CHANGE THIS]
```
You may now start CatAsk:
```sh
docker compose up
```
If you have done everything correctly, going to `http://localhost:8000` in your browser should show a question box screen. You may now log in with your admin password, and configure the instance.