mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/command/with-contenv sh
|
||||
/usr/local/bin/embedded-postgres-bootstrap.sh
|
||||
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
/command/with-contenv sh -c "until pg_isready -h 127.0.0.1 -p 5432 -q; do sleep 1; done"
|
||||
@@ -0,0 +1 @@
|
||||
SIGINT
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/command/with-contenv sh
|
||||
exec s6-setuidgid postgres /usr/lib/postgresql/17/bin/postgres -D /data/postgres
|
||||
@@ -0,0 +1 @@
|
||||
longrun
|
||||
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
Executable
+1
@@ -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"
|
||||
Executable
+8
@@ -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}"
|
||||
@@ -0,0 +1 @@
|
||||
longrun
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/command/with-contenv sh
|
||||
cd /app
|
||||
exec s6-setuidgid snapotter pnpm --filter @snapotter/api run start
|
||||
@@ -0,0 +1 @@
|
||||
longrun
|
||||
Reference in New Issue
Block a user