Skip to content

Commit bb28351

Browse files
authored
Merge pull request #1 from bytevet/dev
feat: template volume mounts, dialog improvements, compose split
2 parents 344ce99 + 0ea7a0a commit bb28351

16 files changed

Lines changed: 1444 additions & 274 deletions

compose.dev.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
services:
2+
app:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
ports:
7+
- "${PORT:-3000}:3000"
8+
environment:
9+
- DATABASE_URL=postgresql://blackhouse:${POSTGRES_PASSWORD:-blackhouse}@db:5432/blackhouse
10+
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:?Set BETTER_AUTH_SECRET in .env or environment}
11+
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
12+
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
13+
- BLACKHOUSE_CONTAINER_URL=${BLACKHOUSE_CONTAINER_URL:-http://host.docker.internal:3000}
14+
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
15+
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
16+
volumes:
17+
- ${DOCKER_HOST_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
18+
security_opt:
19+
- label=disable
20+
extra_hosts:
21+
- "host.docker.internal:host-gateway"
22+
depends_on:
23+
db:
24+
condition: service_healthy
25+
restart: unless-stopped
26+
healthcheck:
27+
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
28+
interval: 30s
29+
timeout: 5s
30+
start_period: 15s
31+
retries: 3
32+
deploy:
33+
resources:
34+
limits:
35+
memory: 512M
36+
cpus: "1.0"
37+
reservations:
38+
memory: 128M
39+
logging:
40+
driver: json-file
41+
options:
42+
max-size: "10m"
43+
max-file: "3"
44+
networks:
45+
- blackhouse
46+
47+
db:
48+
image: postgres:17-alpine
49+
environment:
50+
- POSTGRES_USER=blackhouse
51+
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-blackhouse}
52+
- POSTGRES_DB=blackhouse
53+
volumes:
54+
- postgres_data:/var/lib/postgresql/data
55+
healthcheck:
56+
test: ["CMD-SHELL", "pg_isready -U blackhouse"]
57+
interval: 5s
58+
timeout: 5s
59+
retries: 5
60+
restart: unless-stopped
61+
deploy:
62+
resources:
63+
limits:
64+
memory: 256M
65+
cpus: "0.5"
66+
reservations:
67+
memory: 64M
68+
logging:
69+
driver: json-file
70+
options:
71+
max-size: "10m"
72+
max-file: "3"
73+
networks:
74+
- blackhouse
75+
76+
volumes:
77+
postgres_data:
78+
79+
networks:
80+
blackhouse:
81+
driver: bridge

compose.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
services:
22
app:
33
image: ghcr.io/bytevet/blackhouse:main
4-
build:
5-
context: .
6-
dockerfile: Dockerfile
74
ports:
85
- "${PORT:-3000}:3000"
96
environment:

drizzle/0001_dizzy_silver_fox.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ALTER TABLE "templates" ADD COLUMN "volume_mounts" jsonb;--> statement-breakpoint
2+
CREATE INDEX "idx_sessions_user_id" ON "coding_sessions" USING btree ("user_id");--> statement-breakpoint
3+
CREATE INDEX "idx_sessions_status" ON "coding_sessions" USING btree ("status");--> statement-breakpoint
4+
CREATE INDEX "idx_templates_user_id" ON "templates" USING btree ("user_id");--> statement-breakpoint
5+
CREATE INDEX "idx_templates_is_public" ON "templates" USING btree ("is_public");

0 commit comments

Comments
 (0)