Ackee is a simple analytics tool that consists of two parts:
- A node server running on a server of your choice
- A tracking script that talks to that server
The node server shows you the UI and receives the request from all of your sites, while the tracking script is set up on each site you want to analyze. Since normally your site and your analytics server are running on the same machine, a subdomain is recommended to proxy all requests from that subdomain to the node server. The following guides help you to set up Ackee on an infrastructure of your choice.
- With Docker Compose
- With Docker
- With Helm
- Without Docker
- With Netlify
- With Vercel
- With Heroku
- With Render
Pull the project and create a .env
file in the root to store all environment variables in one file.
ACKEE_USERNAME=username
ACKEE_PASSWORD=password
Only those two are required to run Ackee with the existing docker-compose.yml
. Take a look at the options for a detailed explanation.
Run this command in the root of the project to use the predefined docker-compose.yml
. It contains everything you need, including MongoDB and Ackee.
docker-compose up
💡 Add the
-d
flag to the Docker command to run the services in the background.
Ackee will output the URL it's listening on once the server is running. Visit the URL with your browser and complete the finial steps using the interface.
Ackee now runs on port 3000
and is only accessible from you local network. It's recommended to use a reverse proxy in front of Ackee. The following guides will help you through this steps.
Ackee requires a running MongoDB instance. The easiest way to install MongoDB is by using Docker. Skip this step if you have MongoDB installed or visit the website of MongoDB for alternative setups.
docker run -p 27017:27017 --name mongo mongo
For persistent storage, mount a host directory to the container directory /data/db
, which is identified as a potential mount point in the mongo Dockerfile. When starting a new container, Docker will use the volume of the previous container and copy it to the new container, ensuring that no data gets lost.
docker run -p 27017:27017 -v /path/to/local/folder:/data/db --name mongo mongo
💡 Add the
-d
flag to the Docker command to run MongoDB in the background.
Explanation:
-p
makes port27017
available at port27017
on the host-v
mounts/path/to/local/folder
to/data/db
of the container--name
sets the container name tomongo
mongo
is the name of the image
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
💡 Add the
-d
flag to the Docker command to run Ackee in the background.
Explanation:
-p
makes port3000
available at port3000
on the host-e
sets environment variables required by Ackee--link
links Ackee with themongo
container--name
sets the container name toackee
electerious/ackee
is the name of the image
Ackee will output the URL it's listening on once the server is running. Visit the URL with your browser and complete the finial steps using the interface.
Ackee now runs on port 3000
and is only accessible from you local network. It's recommended to use a reverse proxy in front of Ackee. The following guides will help you through this steps.
Based on the default values.yaml
create your own with overrides as needed.
helm repo add suda https://suda.github.io/charts/
helm repo update
helm install ackee-release suda/ackee -n ackee -f values.yaml
If you're using the ingress-nginx
, enabling the ingress will set the necessary annotations to enable CORS.
Ackee dependents on …
Make sure to install and update all dependencies before you continue. The installation instructions for the individual dependencies can be found on the linked websites.
Pull the project and configure Ackee using environment variables or create a .env
file in the root of the project to store all variables in one file.
ACKEE_MONGODB=mongodb://localhost:27017/ackee
ACKEE_USERNAME=username
ACKEE_PASSWORD=password
Only those three are required to run Ackee. Take a look at the options for a detailed explanation.
The MongoDB connection string is used to connect to your MongoDB. It should also contain the username and password of your MongoDB instance when required.
The username and password variables are used to secure your Ackee interface/API.
Install all required dependencies.
yarn install
Ackee will output the URL it's listening on once the server is running. Visit the URL with your browser and complete the finial steps using the interface.
yarn start
Ackee now runs on port 3000
and is only accessible from you local network. It's recommended to use a reverse proxy in front of Ackee. The following guides will help you through this steps.
- You need to have a MongoDB instance running (e.g. MongoDB Atlas)
- Set a username and password to protect your interface
- Ensure that you're using the correct CORS headers by setting
ACKEE_ALLOW_ORIGIN
.
Netlify adds a forked version of Ackee to your GitHub repositories. You can always pull the newest code from the original project. Pushing those changes to your repository will automatically deploy the new version of Ackee on Netlify.
When prompted to select a directory, select the root directory.
- Set the build command:
yarn build
- Set the output directory:
dist
- Set environment variables
ACKEE_USERNAME
,ACKEE_PASSWORD
,ACKEE_MONGODB
, andACKEE_ALLOW_ORIGIN
.
Vercel adds a forked version of Ackee to your GitHub repositories. You can always pull the newest code from the original project. Pushing those changes to your repository will automatically deploy the new version of Ackee on Vercel.
Deploy to Heroku by clicking this button:
- You need to have a MongoDB instance running, either hosting it yourself, using MongoDB Atlas or by using a (paid) add-on like ObjectRocket MongoDB. This is as simple as typing
heroku addons:create ormongo:2-wt --app <YOUR_APP_NAME>
using the CLI, or using the web dashboard; more details at the official documentation. You'll need to provide connection details to Ackee dyno, either from the web dashboard or via command line, e.g.heroku config:add "ACKEE_MONGODB=mongodb://<host>:<port>/<db>"
- Ensure that you're using the correct CORS headers by setting
ACKEE_ALLOW_ORIGIN
.
The easiest way to update Ackee once hosted on Heroku is to clone the repo down, pull the latest changes from Ackee, and then push them back up to Heroku. You'll need the Heroku CLI and Git for this to work.
In your application view, you'll find instructions under the Deploy
tab on how to clone down the project. It should look something like below:
heroku login
heroku git:clone -a <your ackee applicaton name>
You'll then want to add the Ackee repo as origin, pull the latest changes, and push it back up to Heroku.
git remote add origin https://github.com/electerious/Ackee.git
git pull origin master
git push heroku master
After your application re-deploys you'll have the latest version of Ackee!
You can use Render's one-click deploy button to get up and running with Ackee in minutes.
Click Deploy to Render below and follow the prompts to set up Ackee on Render.
Once your deploy has finished, you are ready to start using Ackee! Visit the URL for your service to login. You can get your login credentials from the ACKEE_USERNAME
and ACKEE_PASSWORD
environment variables in the Environment tab of your service. By default, your username will be render
and your password will be a randomly generated string.