Simplify Quick Start: single docker compose up
- Dockerfile: auto-generate DUMPSTER_SECRET if not set - compose.yml: remove env_file requirement, use env vars with defaults, share web_assets volume with caddy - README: Quick Start is now 3 commands (clone, cd, docker compose up)
This commit is contained in:
@@ -7,29 +7,15 @@ Built for fun, maintained with pride, named with intent.
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Clone
|
||||
git clone ssh://git@git.dustin.coffee:2222/hobokenchicken/dumpsterChat.git
|
||||
cd dumpsterChat
|
||||
|
||||
# Copy and edit environment variables
|
||||
cp .env.example .env
|
||||
$EDITOR .env
|
||||
|
||||
# Start backing services
|
||||
docker compose -f docker/compose.yml up -d
|
||||
|
||||
# Run migrations
|
||||
go run ./cmd/migrate
|
||||
|
||||
# Start the server
|
||||
go run ./cmd/server
|
||||
|
||||
# In another terminal, start the web dev server
|
||||
cd web
|
||||
npm install
|
||||
npm run dev
|
||||
docker compose -f docker/compose.yml up
|
||||
```
|
||||
|
||||
That's it. Visit `http://localhost` to register and start chatting.
|
||||
|
||||
For optional features, copy `.env.example` to `.env` and set Giphy, MinIO, LiveKit, or VAPID keys.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology |
|
||||
@@ -126,8 +112,8 @@ See `.env.example` for the full list. Key variables:
|
||||
|----------|------------|----------|
|
||||
| `DUMPSTER_HOST` | Server bind address | No (default: localhost) |
|
||||
| `DUMPSTER_PORT` | Server port | No (default: 8080) |
|
||||
| `DUMPSTER_SECRET` | Session signing secret | Yes |
|
||||
| `POSTGRES_*` | Database connection | Yes |
|
||||
| `DUMPSTER_SECRET` | Session signing secret | No (auto-generated in Docker) |
|
||||
| `POSTGRES_*` | Database connection | No (defaults in compose) |
|
||||
| `LIVEKIT_*` | Voice/video server | No |
|
||||
| `GIPHY_API_KEY` | Giphy API key for GIF search | No |
|
||||
| `MINIO_*` | File upload storage | No |
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ WORKDIR /app
|
||||
COPY --from=go-builder /bin/dumpster-server /app/dumpster-server
|
||||
COPY --from=web-builder /app/dist /srv/web
|
||||
EXPOSE 8080
|
||||
CMD ["/app/dumpster-server"]
|
||||
CMD ["sh", "-c", "if [ -z \"$DUMPSTER_SECRET\" ]; then export DUMPSTER_SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32); fi; /app/dumpster-server"]
|
||||
|
||||
+17
-11
@@ -6,15 +6,26 @@ services:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
container_name: dumpster-app
|
||||
env_file:
|
||||
- ../.env
|
||||
environment:
|
||||
DUMPSTER_HOST: ${DUMPSTER_HOST:-localhost}
|
||||
DUMPSTER_PORT: "8080"
|
||||
DUMPSTER_SECRET: ${DUMPSTER_SECRET:-}
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: ${POSTGRES_USER:-dumpster}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-dumpster}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-dumpster}
|
||||
VALKEY_URL: redis://valkey:6379
|
||||
MINIO_ENDPOINT: minio:9000
|
||||
MINIO_ENDPOINT: ${MINIO_ENDPOINT:-}
|
||||
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-}
|
||||
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-}
|
||||
LIVEKIT_API_KEY: ${LIVEKIT_API_KEY:-devkey}
|
||||
LIVEKIT_API_SECRET: ${LIVEKIT_API_SECRET:-secret}
|
||||
GIPHY_API_KEY: ${GIPHY_API_KEY:-}
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- web_assets:/srv/web
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -30,8 +41,6 @@ services:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-dumpster}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-dumpster} -d ${POSTGRES_DB:-dumpster}"]
|
||||
interval: 5s
|
||||
@@ -43,8 +52,6 @@ services:
|
||||
container_name: dumpster-valkey
|
||||
volumes:
|
||||
- valkey_data:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "valkey-cli", "ping"]
|
||||
interval: 5s
|
||||
@@ -60,9 +67,6 @@ services:
|
||||
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:-dumpster-secret}
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
|
||||
livekit:
|
||||
image: livekit/livekit-server:latest
|
||||
@@ -103,6 +107,7 @@ services:
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- web_assets:/srv/web:ro
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
depends_on:
|
||||
@@ -112,5 +117,6 @@ volumes:
|
||||
postgres_data:
|
||||
valkey_data:
|
||||
minio_data:
|
||||
web_assets:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
|
||||
Reference in New Issue
Block a user