Twan07 commited on
Commit
156adf4
·
verified ·
1 Parent(s): ea038b6

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +8 -27
start.sh CHANGED
@@ -1,39 +1,20 @@
1
  #!/bin/bash
 
 
2
  git clone "$REPO" .
3
  npm install
4
- npm install cross-blob
5
- npm install node-fetch
6
- npm i --save-dev @types/busboy
7
- npm i --save-dev @types/uuid
8
- npm i --save-dev @types/unidecode
9
  npm ci --production
10
 
11
- echo "nameserver 8.8.8.8" > /tmp/resolv.conf
12
-
13
- echo "nameserver 1.1.1.1" >> /tmp/resolv.conf
14
-
15
- sudo sh -c 'echo -e "nameserver 1.1.1.1\nnameserver 8.8.8.8" > /etc/resolv.conf'
16
-
17
- cat /etc/resolv.conf
18
-
19
-
20
- NODE_OPTIONS="
21
  --max-old-space-size=4096
22
  --max-semi-space-size=1024
23
  --initial-old-space-size=2048
24
  --expose-gc
25
  "
26
-
27
- # OS-level tuning (Linux)
28
- if [[ "$OSTYPE" == "linux-gnu"* ]]; then
29
- # Increase socket buffer sizes
30
- sysctl -w net.core.rmem_max=134217728
31
- sysctl -w net.core.wmem_max=134217728
32
- sysctl -w net.ipv4.tcp_rmem="4096 87380 134217728"
33
- sysctl -w net.ipv4.tcp_wmem="4096 65536 134217728"
34
- fi
35
 
36
  # Run server
37
- export NODE_OPTIONS="$NODE_OPTIONS"
38
- export NODE_ENV=production
39
- node --enable-source-maps index.js
 
1
  #!/bin/bash
2
+
3
+ # Clone and install dependencies
4
  git clone "$REPO" .
5
  npm install
6
+ npm install cross-blob node-fetch
7
+ npm i --save-dev @types/busboy @types/uuid @types/unidecode
 
 
 
8
  npm ci --production
9
 
10
+ # Node tuning
11
+ export NODE_OPTIONS="
 
 
 
 
 
 
 
 
12
  --max-old-space-size=4096
13
  --max-semi-space-size=1024
14
  --initial-old-space-size=2048
15
  --expose-gc
16
  "
17
+ export NODE_ENV=production
 
 
 
 
 
 
 
 
18
 
19
  # Run server
20
+ node --enable-source-maps index.js