npm install
cp .env.sample .env
collection: actions
indexes:
{"id": 1}
{"text": 1}
{"text": "text"}
node index.js
curl -X POST \
http://localhost:3000/api/auth/register \
-d '{
"username": "<username>",
"password": "<password>",
"token": "<admintokenkey>"
}'
docker build -t <image_name>:<tag> .
docker run -d --name actions_logger \
-e APP_PORT=3000 \
-e JWT_KEY=jwtsecretkey \
-e JWT_TTL=2592000000 \
-e ADMIN_TOKEN=admintokenkey
-e MONGODB_URI=<mongodb_uri_here>
--restart always \
<image_name>:<tag>