Skip to content

Commit 9905628

Browse files
committed
on production the nodejs should exit after the build (relase the memory)
1 parent f6c5684 commit 9905628

File tree

1 file changed

+1
-4
lines changed
  • {{cookiecutter.repo_name}}/docker/nodejs/config

1 file changed

+1
-4
lines changed

{{cookiecutter.repo_name}}/docker/nodejs/config/run.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# coding: utf-8
22
# Core and 3th party packages
33
import click
4-
import signal
54

65
# Utils Imports
7-
from runutils import runbash, run_cmd, getvar, sleep, ensure_dir, run_daemon
6+
from runutils import runbash, run_cmd, getvar, ensure_dir, run_daemon
87

98

109
@click.group()
@@ -24,15 +23,13 @@ def shell(user):
2423
@run.command()
2524
def start_watchify():
2625
run_daemon(['npm', 'run', 'watch'], user='developer')
27-
sleep()
2826

2927

3028
@run.command()
3129
def start_build():
3230
run_cmd(['npm', 'config', 'set', 'NODE_ENV', 'production'],
3331
user='developer')
3432
run_cmd(['npm', 'run', 'build'], message="npm run build", user='developer')
35-
sleep()
3633

3734

3835
if __name__ == '__main__':

0 commit comments

Comments
 (0)