MAC Logging application is developed in order to provide a tool to detect when people come and go from work, depending on MAC addresses of their personal devices.
Get the source code:
git clone https://github.com/eaudeweb/mac-logging.git
cd mac-logging
Customize env files:
cp docker/app.env.example docker/app.env
vim docker/app.env
Customize docker orchestration:
cp docker-compose.override.yml.example docker-compose.override.yml
Start stack, all services should be "Up" :
docker-compose up -d
docker-compose ps
Run tests:
docker exec -it pontaj.app sh
pip install -r requirements-dev.txt
py.test --cov=clocking tests
See it in action: http://localhost:5000
Get the latest version of source code:
cd mac-logging
git pull origin master
Update the application stack (all services should be "Up") and run migrations:
docker-compose up -d
docker-compose ps
docker exec pontaj.app python manage.py db alembic upgrade head
See it in action: http://localhost:5000
In the docker-compose.dev.yml, the project directory is mapped inside the app service container. Make sure you set DEBUG=True in app.env to reload the changes.
Start stack, all services should be "Up" :
docker-compose up -d
docker-compose ps
Check application logs:
docker-compose app
When the image is modified you should update the stack:
docker-compose up -d --build
Delete the containers and the volumes with:
docker-compose down -v
Please make sure that DEBUG=True in app.env file.
Update docker-compose.override.yml file app section with the following so that docker-entrypoint.sh is not executed:
entrypoint: ["/usr/bin/tail", "-f", "/dev/null"]
Attach to docker container and start the server in debug mode:
docker exec -it pontaj.app sh
python ./manage.py runserver -h 0.0.0.0 -p 5000
See it in action: http://localhost:5000
Content type
Image
Digest
Size
109.5 MB
Last updated
over 8 years ago
docker pull eaudeweb/mac-logging