forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_image
More file actions
executable file
·38 lines (27 loc) · 887 Bytes
/
build_image
File metadata and controls
executable file
·38 lines (27 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
rm -f Rocket.Chat.tar.*
rm -fr ./build-output-rcchat
# Install imagemagick
sudo apt-get install -y imagemagick
# Check if we have node/npm installed
if ! [ -x "$(command -v npm)" ]; then
echo "Could not find node/npm. Please install and re-run the script"
exit 1
fi
# Check if we have meteor instaled, install if not
if ! [ -x "$(command -v meteor)" ]; then
echo "Could not find meteor, installing"
curl https://install.meteor.com/ | sh
fi
echo "Running npm install"
npm install sharp
npm install --unsafe-perm
echo "Running meteor build"
echo "Destination: ./build-output-rcchat"
export TOOL_NODE_FLAGS="--max-old-space-size=4096 --optimize_for_size --gc-interval=100"
echo $TOOL_NODE_FLAGS
meteor build --server-only ./build-output-rcchat
cp -R ./build-output-rcchat/Rocket.Chat.tar.gz ./
#docker build --tag pp-rcchat-dev:v1 .
echo "Completed"