aboutsummaryrefslogtreecommitdiffstats
path: root/docker/entrypoint.sh
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-05-13 12:11:06 +0100
committerLibravatar GitHub <noreply@github.com>2022-05-13 12:11:06 +0100
commit0cb24b3c34c02185b0799f8e9f3dbff48e8dede2 (patch)
tree85210af9dc566aec9fc93538a637e319ad2e3343 /docker/entrypoint.sh
parentUpgrade 'node' (16.14 -> 16.15); Upgrade 'pnpm' (6 --> 7) (diff)
downloadferdium-server-0cb24b3c34c02185b0799f8e9f3dbff48e8dede2.tar.gz
ferdium-server-0cb24b3c34c02185b0799f8e9f3dbff48e8dede2.tar.zst
ferdium-server-0cb24b3c34c02185b0799f8e9f3dbff48e8dede2.zip
Add update recipes to ferdium server based on github repo (#33)
Diffstat (limited to 'docker/entrypoint.sh')
-rwxr-xr-xdocker/entrypoint.sh24
1 files changed, 23 insertions, 1 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 51df4e3..a928f7e 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -16,6 +16,28 @@ cat << "EOL"
16Brought to you by ferdium.org 16Brought to you by ferdium.org
17EOL 17EOL
18 18
19# Update recipes from official git repository
20npm i -gf pnpm@7.0.1
21
22if [ ! -d "/app/recipes/.git" ]; # When we mount an existing volume (ferdium-recipes-vol:/app/recipes) if this is only /app/recipes it is always true
23then
24 echo '**** Generating recipes for first run ****'
25 git clone --branch main https://github.com/ferdium/ferdium-recipes recipes
26else
27 echo '**** Updating recipes ****'
28 chown -R root /app/recipes # Fixes ownership problem when doing git pull -r
29 cd recipes
30 git stash -u
31 git pull -r
32 git stash pop
33 cd ..
34fi
35
36cd recipes
37pnpm i
38pnpm package
39cd ..
40
19key_file="${DATA_DIR}/FERDIUM_APP_KEY.txt" 41key_file="${DATA_DIR}/FERDIUM_APP_KEY.txt"
20 42
21print_app_key_message() { 43print_app_key_message() {
@@ -41,6 +63,6 @@ export APP_KEY
41 63
42node ace migration:run --force 64node ace migration:run --force
43 65
44chown -R "${PUID:-1000}":"${PGID:-1000}" "${DATA_DIR}" /app 66chown -R "${PUID:-1000}":"${PGID:-1000}" "${DATA_DIR}" /app # This is the cause of the problem on line 29/32
45 67
46su-exec "${PUID:-1000}":"${PGID:-1000}" node server.js 68su-exec "${PUID:-1000}":"${PGID:-1000}" node server.js