blob: 581c76eab3a92eea533d7942aca7839d83ab6892 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# 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 <name> <password> [--data ./gallery-data] [--no-thumbs]
```
### Delete a gallery
```sh
./gallery delete <name> [--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 <name> '<password>' --data /app/data"
```
|