-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (50 loc) · 1.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (50 loc) · 1.64 KB
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
# @hasna/knowledge — local development stack.
#
# Provides a throwaway Postgres for exercising cloud mode (PURE REMOTE per
# Amendment A1) against a local database instead of the shared RDS, plus the
# knowledge-serve HTTP API built from the Dockerfile.
#
# # 1. bring up postgres and apply the schema
# docker compose up -d postgres
# HASNA_KNOWLEDGE_STORAGE_MODE=cloud \
# HASNA_KNOWLEDGE_DATABASE_URL=postgres://knowledge:knowledge@localhost:5432/knowledge \
# bun scripts/apply-cloud-migrations.mjs
# # 2. build + start the service
# docker compose up --build serve
#
# Never commit real credentials; the values below are local-only throwaways.
services:
postgres:
image: postgres:16
container_name: hasna-knowledge-postgres
environment:
POSTGRES_USER: knowledge
POSTGRES_PASSWORD: knowledge
POSTGRES_DB: knowledge
ports:
- "5432:5432"
volumes:
- knowledge-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U knowledge -d knowledge"]
interval: 5s
timeout: 5s
retries: 10
serve:
build:
context: .
dockerfile: Dockerfile
container_name: hasna-knowledge-serve
depends_on:
postgres:
condition: service_healthy
environment:
PORT: "8080"
HASNA_KNOWLEDGE_STORAGE_MODE: cloud
HASNA_KNOWLEDGE_DATABASE_URL: postgres://knowledge:knowledge@postgres:5432/knowledge?sslmode=disable
# Local-only throwaway signing secret. Use a real secret in production.
HASNA_KNOWLEDGE_API_SIGNING_KEY: local-dev-signing-secret-change-me
ports:
- "8080:8080"
volumes:
knowledge-pgdata: