debian #22
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@
|
|||||||
/dbimport
|
/dbimport
|
||||||
/dbexport
|
/dbexport
|
||||||
/json
|
/json
|
||||||
|
/release
|
||||||
|
*.zip
|
||||||
|
7
cli/deploy.zsh
Normal file
7
cli/deploy.zsh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
rm -rf ismism/cli
|
||||||
|
rm -rf ismism/ismism.ts
|
||||||
|
rm -rf ismism/ui
|
||||||
|
|
||||||
|
unzip ismism.zip -d ismism
|
||||||
|
|
||||||
|
rm ismism.zip deploy.zsh
|
18
cli/release.zsh
Normal file
18
cli/release.zsh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
rm -rf release
|
||||||
|
git clone --depth 1 git@gitlab.com:728/ismism.git release
|
||||||
|
rm -rf release/.git
|
||||||
|
|
||||||
|
zsh cli/build.zsh
|
||||||
|
cp -r ui release
|
||||||
|
|
||||||
|
if [ "$1" = "dbimport" ]; then
|
||||||
|
echo "cp -r dbimport release"
|
||||||
|
cp -r dbimport release
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f ismism.zip
|
||||||
|
cd release
|
||||||
|
zip -r ../ismism.zip .
|
||||||
|
cd ..
|
||||||
|
scp -i ~/work/ismism/72eight.pem -r ismism.zip root@43.154.15.138:/root/
|
||||||
|
scp -i ~/work/ismism/72eight.pem -r cli/deploy.zsh root@43.154.15.138:/root/
|
@ -1,6 +1,15 @@
|
|||||||
rm -rf log; mkdir log
|
rm -rf log; mkdir log
|
||||||
|
|
||||||
nohup mongod --config mongod.yaml > log/mongod.log &
|
if systemctl > /dev/null; then
|
||||||
|
chown -R mongodb:mongodb /var/lib/mongodb
|
||||||
|
chown mongod:mongod /tmp/mongodb-27017.sock
|
||||||
|
cp -f mongod.service /lib/systemd/system/
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl start mongod
|
||||||
|
else
|
||||||
|
nohup mongod --config mongod.yaml > log/mongod.log &
|
||||||
|
fi
|
||||||
|
|
||||||
nohup deno run --allow-net --allow-read ismism.ts/src/serve.ts > log/ismism.log &
|
nohup deno run --allow-net --allow-read ismism.ts/src/serve.ts > log/ismism.log &
|
||||||
nohup nginx -p . -c nginx.conf > log/nginx.log &
|
nohup nginx -p . -c nginx.conf > log/nginx.log &
|
||||||
|
|
||||||
|
33
mongod.service
Normal file
33
mongod.service
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Description=MongoDB Database Server
|
||||||
|
Documentation=https://docs.mongodb.org/manual
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=mongodb
|
||||||
|
Group=mongodb
|
||||||
|
EnvironmentFile=-/etc/default/mongod
|
||||||
|
WorkingDirectory=/root/ismism
|
||||||
|
ExecStart=mongod --config mongod.yaml
|
||||||
|
PIDFile=/var/run/mongodb/mongod.pid
|
||||||
|
# file size
|
||||||
|
LimitFSIZE=infinity
|
||||||
|
# cpu time
|
||||||
|
LimitCPU=infinity
|
||||||
|
# virtual memory size
|
||||||
|
LimitAS=infinity
|
||||||
|
# open files
|
||||||
|
LimitNOFILE=64000
|
||||||
|
# processes/threads
|
||||||
|
LimitNPROC=64000
|
||||||
|
# locked memory
|
||||||
|
LimitMEMLOCK=infinity
|
||||||
|
# total threads (user+kernel)
|
||||||
|
TasksMax=infinity
|
||||||
|
TasksAccounting=false
|
||||||
|
|
||||||
|
# Recommended limits for mongod as specified in
|
||||||
|
# https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Reference in New Issue
Block a user