The process of deploying and running countly server with docker in win10


Recently just contact and familiar withcountlyThis article mainly records the whole process of using docker container to install and deploy countly server in Windows 10. It can also be regarded as some simple summary and thinking of myself


Docker is an open source application container engine. Containers use sandbox mechanism completely, and there is no interface influence between them. It can help developers to create, share and run modern applications safely.


Countly is an open source data analysis platform, which can collect, display and analyze data from mobile terminals, clients and other sources in one stop. In addition, it has many built-in plug-ins, which can be used for personalized development and new plug-ins can be completely customized according to business needs

2. Install and configure dokcer installation

Doker now supports Linux, windows, datacenter, cloud and many other platforms. Installation in Windows environment is the same as installation of other software. Just follow the prompts step by step. This is the download address of the network disk & extraction code: eumv. Please move to the official website for the latest version


Image installation and operation

Countly server needs to run under Linux, so you need to install Linux image. You can search on dockerhub official website in advance

In this paper, the ubutun image in docker hub is selected, and the latest version is downloaded by default without specifying the version number

Enter the installation directory of docker and use the docker command to download Ubuntu

// download latest ubuntu
  docker pull ubuntu

Docker running Ubuntu: – I: running interactively, – t: terminal, – P: port mapping, – V: file directory mapping (Windows Directory: Ubuntu directory)

docker run -ti -p 6001:6001 -v /c/countly-server:/countly/countly-server ubuntu bash

Countly server configuration in Ubuntu

 Mongodb installation

Method 1 (may lag behind the official website version)

apt-get update
  apt-get install mongo

Method 2 (download and unzip directly from the official website)

Go to mongodb download page and switch to【MongoDB Community Sever】Select the version, operating system, installation package format, and the download address will appear below

  apt-get update 
  #Download curl
  apt-get install curl 
  #Download the compressed package of Linux version corresponding to mongodb official website
  get curl -O
  #Decompress Mongo package
  tar -zxvf mongodb-linux-x86_64-ubuntu1804-4.2.1.tgz
  #Move the extracted files to the global installation directory
  mv mongodb-linux-x86_64-ubuntu1804-4.2.1.tgz /usr/local/mongodb
  #Set path
  export PATH=/usr/local/mongodb/bin:$PATH

Nodejs installation

Method 1

apt-get update
  apt-get install nodejs

Method 2: download the installation package from nodejs official website, and the specific steps are similar to mongodb installation

  • Port configuration mongodb:27017
  • dashboard: 6001

 Start County server

The startup process involves multiple command line sessions of database, interface service and dashboard page. Here, we can consider using screen to split multiple windows, so that we can switch between multiple sessions freely

apt-get install screen

1. Start mongodb:

#New mongodb
  screen -S mongodb
  #Start mongodb
  mongod --dbpath=/countly/mongodb/data --logpath=/countly/mongodb/log/mongo.log --logappend

2. Start API

#New API service session
  screen -S api
  #Go to the countly server directory
  cd countly/countly-server
  #Start the API interface service of countly
  DEBUG=development supervisor node api/api.js

3. Start dashboard

#New dashboard session
  screen -S dashboard
  #Go to the countly server directory
  cd countly/countly-server
  #Start the countly server main project
  NODE_ENV=development supervisor node frontend/express/app.js

4. Browser access localhost:6001


The above is the process of deploying and running countly server in win10 introduced by Xiaobian. I hope it can help you. If you have any questions, please leave me a message and Xiaobian will reply you in time. Thank you very much for your support to developer!
If you think this article is helpful to you, please reprint, please indicate the source, thank you!

Recommended Today

Introduction to vernacular spring cloud

First of all, let me show you a picture. If you don’t understand this picture very well, I hope you will suddenly realize it after reading my article. What is spring cloud Building a distributed system doesn’t need to be complex and error prone. Spring cloud provides a simple and easy to accept programming model […]