diff options
author | Guillermo Ramos | 2025-02-17 15:53:35 +0100 |
---|---|---|
committer | Guillermo Ramos | 2025-02-17 15:53:35 +0100 |
commit | c26d581053bbfb9af2dcb32810477a388304e92e (patch) | |
tree | 2dc392db71ecb7e5982f77d39548d67aea77a245 | |
parent | 4e766cc4d1f46ab8851d77684382f5f6c10b7dce (diff) | |
download | s6-services-c26d581053bbfb9af2dcb32810477a388304e92e.tar.gz |
waev: load user/path from env
-rw-r--r-- | waev/env.sample | 6 | ||||
-rwxr-xr-x | waev/run | 22 |
2 files changed, 20 insertions, 8 deletions
diff --git a/waev/env.sample b/waev/env.sample new file mode 100644 index 0000000..63c1005 --- /dev/null +++ b/waev/env.sample @@ -0,0 +1,6 @@ +WAEV_USER=someone +WAEV_PATH=/home/someone/waev +HOME=/home/someone +PORT=8080 +MIX_ENV=prod +SECRET_KEY_BASE=VeryLongSecret @@ -1,10 +1,16 @@ -#!/bin/sh +#!/bin/execlineb -source $(dirname $0)/env +envfile env -s6-setuidgid gramos sh -c ' -cd ~/git/waev -mix deps.get -mix phx.digest -exec mix phx.server -' +importas -S WAEV_USER +s6-setuidgid $WAEV_USER + +importas -S WAEV_PATH +cd $WAEV_PATH + +foreground { + mix deps.get + mix phx.digest +} + +mix phx.server |