# kagapics
A lightweight, self-hosted photo gallery for collecting trip photos from friends. Single Go binary, no database, no runtime dependencies.
## Build
```sh
go build -o gallery .
```
## Usage
### Create a gallery
```sh
./gallery create [--data ./gallery-data] [--no-thumbs]
```
### Delete a gallery
```sh
./gallery delete [--data ./gallery-data]
```
Removes the gallery from the config and deletes its folder (photos + thumbnails). Asks for confirmation before deleting.
### Start the server
```sh
./gallery serve [--addr :8080] [--data ./gallery-data]
```
## Test
```sh
go test ./...
```
## Deploy
The VPS runs the gallery as a Docker Compose service behind Caddy at
`https://pics.kagamino.dev`. The replacement service starts with a fresh local
`./gallery-data` folder next to the VPS Compose file.
Authenticate the local and VPS Docker clients once, then deploy with:
```sh
docker login container.registry.kagamino.dev
ssh ubuntu@feed.kagamino.dev "sudo docker login container.registry.kagamino.dev"
mise run deploy
```
Create a new gallery in the empty deployment from the VPS:
```sh
ssh ubuntu@feed.kagamino.dev \
"sudo docker compose exec gallery /app/gallery create '' --data /app/data"
```
