chore: make docker
This commit is contained in:
50
README.md
50
README.md
@@ -72,6 +72,56 @@ docker run -d \
|
||||
your-image:latest
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
Build the image:
|
||||
|
||||
```bash
|
||||
docker build -t ghcr.io/your-org/joel-bot:latest .
|
||||
```
|
||||
|
||||
Run it locally:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name joel-bot \
|
||||
-p 3000:3000 \
|
||||
-v joel_data:/data \
|
||||
--env-file .env \
|
||||
ghcr.io/your-org/joel-bot:latest
|
||||
```
|
||||
|
||||
The container now starts in production mode and does not enable the CSS file watcher.
|
||||
|
||||
## k3s
|
||||
|
||||
The repo includes starter manifests in [`k8s/deployment.yaml`](/Users/eric/Projects/joel-discord/k8s/deployment.yaml), [`k8s/secret.example.yaml`](/Users/eric/Projects/joel-discord/k8s/secret.example.yaml), and [`k8s/ingress.example.yaml`](/Users/eric/Projects/joel-discord/k8s/ingress.example.yaml).
|
||||
|
||||
Typical flow:
|
||||
|
||||
```bash
|
||||
# Build and push the image
|
||||
docker build -t ghcr.io/your-org/joel-bot:latest .
|
||||
docker push ghcr.io/your-org/joel-bot:latest
|
||||
|
||||
# Create your secret manifest from the example and fill in real values
|
||||
cp k8s/secret.example.yaml k8s/secret.yaml
|
||||
|
||||
# Apply namespace, PVC, deployment, and service
|
||||
kubectl apply -f k8s/deployment.yaml
|
||||
kubectl apply -f k8s/secret.yaml
|
||||
|
||||
# Optional if you want the web UI exposed through Traefik
|
||||
kubectl apply -f k8s/ingress.example.yaml
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- Update the image in `k8s/deployment.yaml` to your registry path.
|
||||
- Set `WEB_BASE_URL` in the secret to the public HTTPS URL you expose through ingress.
|
||||
- The deployment mounts `/data` on a PVC and stores SQLite at `/data/db.sqlite3`.
|
||||
- k3s usually provisions the PVC automatically via the default `local-path` storage class.
|
||||
|
||||
## Scripts
|
||||
|
||||
| Script | Description |
|
||||
|
||||
Reference in New Issue
Block a user