An open API service indexing awesome lists of open source software.

https://github.com/albinodrought/creamy-board

Yet Another Open Imageboard
https://github.com/albinodrought/creamy-board

imageboard

Last synced: about 2 months ago
JSON representation

Yet Another Open Imageboard

Awesome Lists containing this project

README

        

# Creamy Board


Creamy Board Cat Logo

Yet Another Open Imageboard



AGPL-3.0 License

## Screenshots

![Creamy Board using default data](./screenshot.png)

## Building

### Without Docker

```
# install generation utils and generate
go install github.com/jschaf/pggen/cmd/pggen@latest
go install github.com/a-h/templ/cmd/[email protected]
go generate ./...

go build
```

### With Docker

`docker build -t ghcr.io/albinodrought/creamy-board .`

## Usage

For an out-of-the-box compose file, see [./compose/docker-compose.yml](./compose/docker-compose.yml)

- `CREAMY_DSN`: Postgres DSN passed to pgx
- `CREAMY_STORAGE_DRIVER`: `fs` or `minio`
- if `fs`:
- `CREAMY_STORAGE_PATH`: files will be saved to this path
- `CREAMY_STORAGE_XOR`: xor all file streams using this single hex byte to prevent the host system from generating thumbnails (ex. `CREAMY_STORAGE_XOR=BA`) (this is not encryption)
- if `minio`:
- `CREAMY_MINIO_KEY`: Minio access key
- `CREAMY_MINIO_SECRET`: Minio secret key
- `CREAMY_MINIO_ENDPOINT`: Minio endpoint
- `CREAMY_MINIO_BUCKET`: Minio bucket
- `CREAMY_LISTEN_ADDRESS`: `serve` listens on this `addr:port` pair

Run migrations:

```
CREAMY_DSN=dbname=creamyboard user=someuser password=somesecret host=postgres sslmode=disable \
CREAMY_STORAGE_DRIVER=minio \
CREAMY_MINIO_ENDPOINT=http://minio:9000 \
CREAMY_MINIO_KEY=creamyboard \
CREAMY_MINIO_SECRET=creamyboard \
CREAMY_MINIO_BUCKET=creamyboard \
./creamy-board migrate
```

Serve board:

```
CREAMY_LISTEN_ADDRESS=:80 \
CREAMY_DSN=dbname=creamyboard user=someuser password=somesecret host=postgres sslmode=disable \
CREAMY_STORAGE_DRIVER=minio \
CREAMY_MINIO_ENDPOINT=http://minio:9000 \
CREAMY_MINIO_KEY=creamyboard \
CREAMY_MINIO_SECRET=creamyboard \
CREAMY_MINIO_BUCKET=creamyboard \
./creamy-board serve
```

## Disclaimer

This is a toy project (only a fool would run anything here on prod)