Browse Source

Improve assemble script. Run script not needed anymore

pull/2/head
Nicolas Massé 9 years ago
parent
commit
1930f67368
  1. 6
      .s2i/bin/assemble
  2. 19
      .s2i/bin/run

6
.s2i/bin/assemble

@ -15,7 +15,9 @@ npm install "$NPM_PACKAGE_TO_INSTALL"
# Trim package name (remove the version number) # Trim package name (remove the version number)
package_name="${NPM_PACKAGE_TO_INSTALL%@*}" package_name="${NPM_PACKAGE_TO_INSTALL%@*}"
echo "---> Linking application ..." echo "---> Generating symlinks ..."
ln -s "node_modules/$package_name" main for file in node_modules/$package_name/*; do
ln -s "$file" "$(basename "$file")"
done
fix-permissions ./ fix-permissions ./

19
.s2i/bin/run

@ -1,19 +0,0 @@
#!/bin/bash
# Fail on any non-zero return code
set -e
if [ -e "/opt/app-root/etc/generate_container_user" ]; then
source /opt/app-root/etc/generate_container_user
fi
# Allow users to inspect/debug the builder image itself, by using:
# $ docker run -i -t openshift/centos-nodejs-builder --debug
#
[ "$1" == "--debug" ] && exec /bin/bash
# Run NodeJS Server
echo "Running NodeJS Server..."
export NODE_ENV=production
cd main
run_node
Loading…
Cancel
Save