-
Notifications
You must be signed in to change notification settings - Fork 0
/
mem_lim
executable file
·33 lines (26 loc) · 922 Bytes
/
mem_lim
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
#!/bin/bash
PWD=$(pwd)
source .env
source lib/launch_manager
## main configs
PORT=2000
JWT=false
NAME=mem_lim
_remove_logs $PWD/DocumentServer
# If --memory and --memory-swap are set to the same value,
# this prevents containers from using any swap.
# This is because --memory-swap is the amount of combined memory
# and swap that can be used, while --memory is only the amount
# of physical memory that can be used.
docker run -itd \
-p $PORT:80 \
--name $NAME \
-memory 2g \
--memory-swap 2g \
--env JWT_ENABLED=$JWT \
-v $PWD/DocumentServer/logs:/var/log/onlyoffice \
-v $PWD/DocumentServer/data:/var/www/onlyoffice/Data \
-v $PWD/DocumentServer/lib:/var/lib/onlyoffice \
-v $PWD/DocumentServer/db:/var/lib/postgresql \
onlyoffice/4testing-documentserver-ee:$VERSION
_wait_launch $NAME