feat: all-in-one embedded single-container mode (#377)

Embedded Postgres 17 + Redis via s6-overlay when DATABASE_URL/REDIS_URL are unset; restores the one-command docker run for 2.0. EMBEDDED=0 disables; Compose stays the production path. Verified arm64 (14/14 lifecycle + Compose regression) and amd64 (build + embedded smoke).
This commit is contained in:
SnapOtter
2026-06-29 15:49:09 +08:00
committed by GitHub
parent 0cdd560ac4
commit 084a9c9faa
36 changed files with 656 additions and 24 deletions
+1
View File
@@ -0,0 +1 @@
oneshot
+2
View File
@@ -0,0 +1,2 @@
#!/command/with-contenv sh
/usr/local/bin/embedded-postgres-bootstrap.sh
+1
View File
@@ -0,0 +1 @@
oneshot
+1
View File
@@ -0,0 +1 @@
/command/with-contenv sh -c "until pg_isready -h 127.0.0.1 -p 5432 -q; do sleep 1; done"
+1
View File
@@ -0,0 +1 @@
SIGINT
+2
View File
@@ -0,0 +1,2 @@
#!/command/with-contenv sh
exec s6-setuidgid postgres /usr/lib/postgresql/17/bin/postgres -D /data/postgres
+1
View File
@@ -0,0 +1 @@
longrun
+1
View File
@@ -0,0 +1 @@
oneshot
+1
View File
@@ -0,0 +1 @@
/command/with-contenv sh -c "until redis-cli -h 127.0.0.1 -p 6379 ping 2>/dev/null | grep -q PONG; do sleep 1; done"
+8
View File
@@ -0,0 +1,8 @@
#!/command/with-contenv sh
exec s6-setuidgid snapotter redis-server \
--dir /data/redis \
--bind 127.0.0.1 \
--port 6379 \
--maxmemory-policy noeviction \
--appendonly yes \
--maxmemory "${REDIS_MAXMEMORY:-512mb}"
+1
View File
@@ -0,0 +1 @@
longrun
+3
View File
@@ -0,0 +1,3 @@
#!/command/with-contenv sh
cd /app
exec s6-setuidgid snapotter pnpm --filter @snapotter/api run start
+1
View File
@@ -0,0 +1 @@
longrun