diff options
Diffstat (limited to 'docker/entrypoint.sh')
-rwxr-xr-x | docker/entrypoint.sh | 24 |
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" | |||
16 | Brought to you by ferdium.org | 16 | Brought to you by ferdium.org |
17 | EOL | 17 | EOL |
18 | 18 | ||
19 | # Update recipes from official git repository | ||
20 | npm i -gf pnpm@7.0.1 | ||
21 | |||
22 | if [ ! -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 | ||
23 | then | ||
24 | echo '**** Generating recipes for first run ****' | ||
25 | git clone --branch main https://github.com/ferdium/ferdium-recipes recipes | ||
26 | else | ||
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 .. | ||
34 | fi | ||
35 | |||
36 | cd recipes | ||
37 | pnpm i | ||
38 | pnpm package | ||
39 | cd .. | ||
40 | |||
19 | key_file="${DATA_DIR}/FERDIUM_APP_KEY.txt" | 41 | key_file="${DATA_DIR}/FERDIUM_APP_KEY.txt" |
20 | 42 | ||
21 | print_app_key_message() { | 43 | print_app_key_message() { |
@@ -41,6 +63,6 @@ export APP_KEY | |||
41 | 63 | ||
42 | node ace migration:run --force | 64 | node ace migration:run --force |
43 | 65 | ||
44 | chown -R "${PUID:-1000}":"${PGID:-1000}" "${DATA_DIR}" /app | 66 | chown -R "${PUID:-1000}":"${PGID:-1000}" "${DATA_DIR}" /app # This is the cause of the problem on line 29/32 |
45 | 67 | ||
46 | su-exec "${PUID:-1000}":"${PGID:-1000}" node server.js | 68 | su-exec "${PUID:-1000}":"${PGID:-1000}" node server.js |