Countly on Docker. Supports separated MongoDB container!
543
#Countly Docker Image
I made my own docker image for Countly because the ones already existing simply didnt meet my needs. This image is a lot lighter because it links to another MonogDB instance, so if you already have MongoDB (docker image, see: https://registry.hub.docker.com/_/mongo/) then you dont have to run another DB, and doesnt run behind a server (so you have to install your own if you havent have one already, I provided instructions for NGINX in this tutorial)
This docker image is officialy supported by CodeBuffet. Leave any questions and I try to respond as soon as possible ;)
##Steps
docker pull peterwilli/countlydocker run -d --name YOUR_COUNTLY_NAME -p 6001:6001 -p 3001:3001 --link YOUR_MONGO_INSTANCE_NAME:MONGO -t peterwilli/countly
YOUR_COUNTLY_NAME can be any name you like (I have just 'countly')YOUR_MONGO_INSTANCE_NAME is the name of your currently running mongodb instance.#NGINX configuration
Now we got our countly running, add it to your NGINX server. Use a config like this:
Where YOUR_COUNTLY_SERVER_NAME is the hostname of your countly server (like countly.codebuffet.co).
server {
server_name YOUR_COUNTLY_SERVER_NAME;
access_log off;
location = /i {
proxy_pass http://127.0.0.1:3001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location ^~ /i/ {
proxy_pass http://127.0.0.1:3001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location = /o {
proxy_pass http://127.0.0.1:3001;
}
location ^~ /o/ {
proxy_pass http://127.0.0.1:3001;
}
location / {
proxy_pass http://127.0.0.1:6001;
proxy_set_header Host $http_host;
}
}
Content type
Image
Digest
sha256:16d7eb096…
Size
330.4 MB
Last updated
about 10 years ago
docker pull peterwilli/countly