Skip to content
/ 925r Public
forked from kalmanolah/925r

ninetofiver (925r): a free and open source time and leave tracking application.

License

Notifications You must be signed in to change notification settings

inuits/925r

 
 

Repository files navigation

ninetofiver

Build Status Coverage Status GitHub issues License

ninetofiver (or 925r) is a free and open source time and leave tracking application.

Installation

Install build dependencies:

apt-get install -y python-dev default-libmysqlclient-dev libldap2-dev libsasl2-dev libssl-dev

or

sudo dnf install -y mysql-devel openldap-devel

You'll need pipenv. Installing it is super simple:

pip install pipenv

After that, installing the application is smooth sailing:

pipenv install

Once your pipenv is set up, you can use pipenv shell to get a shell, or just prefix additional commands with pipenv run.

Usage

For usage with Docker, see latter section named Local Development (with Docker).

  1. Run python manage.py migrate to create the models.
  2. Run python manage.py createsuperuser to create an admin user

Running (development)

Running the command below starts a development server at http://127.0.0.1:8000.

python manage.py runserver

Running (production)

Running the command below starts a server using the production configuration at http://127.0.0.1:8000.

Note: The insecure flag is used to allow the server to serve static files.

python manage.py runserver --configuration=Prod --insecure

Local Development (with Docker)

To build, run and test and more ... use magic of make help to play with this project. Make sure you have installed docker and docker compose.

make help

and you receive below list:

build                Build project with docker compose
clean                Clean Reset project containers with docker compose
down                 Reset project containers with docker compose
help                 Show this help
test                 Run project tests and coverage with tox runner
up                   Run project with docker compose

How to run local environment with test data.

Build and run docker containers.

make build
make up

Exec initial migration. After exec should be your 925r container name.

docker exec 925r-web python manage.py migrate

Interactively create a new superuser.

docker exec -it 925r-web python manage.py createsuperuser

If you are running YaYata too (in debug mode), then you could need to change 925r port from 8888 to something else, because YaYata runs webpack on the port 8888.

Next steps