Passer au contenu principal

Statistique web avec Ackee via Docker

1. Installation de la Base MongoDB :
docker run -p 27017:27017 -v /path/to/local/folder:/data/db --name mongo mongo

Explication : 

  • -p ouvrir le port 27017 disponible sur le port 27017 sur l'host
  • -v mounts /path/to/local/folder vers /data/db du container
  • --name choisir un nom au container mongo
  • mongo le nom de l'image docker

 

2. Création du container Ackee et de MongoDB
docker run -p 3000:3000 -e ACKEE_MONGODB='mongodb://mongo:27017/ackee' -e ACKEE_USERNAME='username' -e ACKEE_PASSWORD='password' --link mongo --name ackee electerious/ackee

Explanation:

  • -p makes port 3000 available at port 3000 on the host
  • -e sets environment variables required by Ackee
  • --link links Ackee with the mongo container
  • --name sets the container name to ackee
  • electerious/ackee is the name of the image

 

3. Ouvrir Ackee