A lightweight pixel tracking service written in Python
3.4K
A lightweight Tracking Pixel service written in Python.
user@shell> docker pull devdull/pyxie:latest
latest: Pulling from devdull/pyxie
> snip <
Status: Downloaded newer image for devdull/pyxie:latest
docker.io/devdull/pyxie:latest
user@shell> mkdir data
When running PyXIE as a Docker image, it is recommended to set the DATABASE_FILE value in config.yaml to ensure that data is persisted between container restarts. Below is a minimal example.
config.yaml:
DATABASE_FILE: /app/data/uadb.json
API_KEYS:
- your-api-key-here
- a-different-api-key-here
- Another API key with spaces and a comma, but this might be hard to use later.
user@shell> docker run -d --mount type=bind,src="./config.yaml",dst="/app/config.yaml" --mount type=bind,src="./data",dst="/app/data" -p 5000:5000 devdull/pyxie:latest
user@shell> curl -X POST -H 'X-Api-Key: your-api-key-here' -d 'id=foo' 'http://localhost:5000/register'
Success
user@shell> ls -l data/ # Confirm the data file exists in the bound directory
total 8
-rw-r--r-- 1 user staff 2043 Jul 8 11:57 uadb.json
The service inside the container is run using Gunicorn. To configure the bind IP and port, you can set the environment variables LISTEN_IP and LISTEN_PORT. These should not be confused for the configuration items used by Flask which can be defined in config.yaml.
Content type
Image
Digest
sha256:773918c4b…
Size
43.8 MB
Last updated
12 months ago
docker pull devdull/pyxie