Skip to content

Latest commit

 

History

History

npm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Description

This example shows you a NPM example using LePresidente FORK.

This example contains multiple containers :

  • crowdsec : Read NPM logs from the mounted volumes
  • npm : The Nginx Proxy Manager container

Before running the example, you need to create a secure database password within the .env file. You can do this by running the following command :

echo "ROOT_DATABASE_PASSWORD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 32)" > .env
echo "DATABASE_PASSWORD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 32)" >> .env

You also need to create a secure api key for the bouncer in crowdsec

docker compose up crowdsec -d
docker compose exec crowdsec cscli bouncer add npm-bouncer
echo "CROWDSEC_BOUNCER_APIKEY=<key shown from above output>" >> .env
docker compose down

Then you can start the containers as normal

docker compose up -d

Prerequisites: Docker / Docker Compose