Commit Graph

7 Commits

Author SHA1 Message Date
Loki
78f4e8f36b
Fix error in startup command
Changed ``if [[ "${MAIN_FILE}" == *.js ]]``
To ``if [[ "${MAIN_FILE}" == "*.js" ]]``

The *.js without quotes compared MAIN_FILE to all files in the current directory that end with .js, resulting in errors like:
```bash
:/home/container$ if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then /usr/local/bin/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install; fi; if [[ "${MAIN_FILE}" == start.js test.js ]]; then /usr/local/bin/node "/home/container/${MAIN_FILE}"; else /usr/local/bin/ts-node "${MAIN_FILE}"; fi
/entrypoint.sh: eval: line 16: syntax error in conditional expression
/entrypoint.sh: eval: line 16: syntax error near `test.js'
/entrypoint.sh: eval: line 16: `if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then /usr/local/bin/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install; fi; if [[ "${MAIN_FILE}" == start.js test.js ]]; then /usr/local/bin/node "/home/container/${MAIN_FILE}"; else /usr/local/bin/ts-node "${MAIN_FILE}"; fi'
```
because it's interpreted as ``if [[ "${MAIN_FILE}" == start.js test.js ]];``
2023-08-17 18:38:17 -07:00
Quinten
295e769a05
Generic nodejs: change installer image to nodejs 18 2023-08-13 19:34:23 +02:00
Quinten
c85a141eab
Generic nodejs: Add typescript support 2023-08-13 10:45:58 +02:00
Dancebunny98
05608e2d6a
Update egg-node-js-generic.json (#2256)
Generic nodejs: add nodejs 19 docker image

---------

Co-authored-by: Quinten <67589015+QuintenQVD0@users.noreply.github.com>
2023-05-19 17:45:01 +02:00
gOOvER
b31d7288dc added npm update to prevent errors 2023-01-27 20:19:52 +01:00
Torsten Widmann
05a05f3862 add nodejs 18 2022-10-16 13:45:38 +02:00
Michael Parker
d93502b2a1 Move generic eggs 2022-09-19 08:39:37 -04:00