repos
/ timestrap-django master

timestrap-django

mirror archived upstream

Time tracking you can host anywhere, built on Django. Full export support in multiple formats and easily extensible.

djangodockerhandcodedpythonself-hostedtime-trackingtimetracker

3.4 KB · 119 lines · markdown Raw History
  1> **Archived.** This project is no longer in use and no longer maintained. Last updated April 2023.
  2
  3# Timestrap
  4
  5Time tracking you can host anywhere. Full export support in
  6multiple formats and easily extensible.
  7
  8
  9## Warning
 10
 11This app is currently very unstable. Everything may, and probably will, change.
 12All migrations are going to be wiped and setup properly before release 1.0 so
 13you will not be able to upgrade to 1.0 from early development.
 14
 15
 16## Documentation
 17
 18For more details and screenshots check out our main docs website:
 19[https://timestrap.bythewood.me/](https://timestrap.bythewood.me/)
 20
 21
 22## Superuser Credentials
 23
 24All installations and the demo create a superuser to get you started, if this
 25is a production deployment you will want to change these.
 26
 27-   Username: `admin`
 28-   Password: `admin`
 29
 30
 31## Docker Installation
 32
 33This creates a minimal docker server setup for Timestrap. This currently is
 34in development and may not have persistent data without fiddling. Any help to
 35improve the docker configuration files would be appreciated.
 36
 37
 38### Docker Requirements
 39
 40-   Docker
 41-   Docker Compose
 42
 43Docker Compose is used for running multiple containers since we require a
 44PostgreSQL database and, not yet but soon, a Redis server for messages and
 45events.
 46
 47
 48### Docker Running
 49
 50Make sure to update the environmental variables in `docker-compose.yml` and
 51check the `timestrap/settings/docker.py` file to see if you'd like to change
 52anything then run:
 53
 54    docker-compose up --detach --build
 55
 56To migrate the database, create your first superuser, and create the initial
 57site configuration you then need to run:
 58
 59    docker-compose exec web python3 manage.py migrate
 60
 61The Timestrap application should now be running on port 80 of whatever system
 62you ran these commands on, if you ran this locally then that would be
 63[http://localhost/](http://localhost/).
 64
 65
 66### Docker Data
 67
 68All data should be stored in the timestrap_db volume. If you wish to rebuild
 69Timestrap at the latest you can do the following from the timestrap repo you
 70cloned:
 71
 72    git pull
 73    docker-compose up --detach --build
 74    docker-compose exec web python3 manage.py migrate
 75
 76All data will be kept during this process and you'll have the latest version
 77of Timestrap.
 78
 79
 80## Development Installation
 81
 82If you'd like to contribute code to Timestrap you'll need to do this!
 83
 84
 85### Development Requirements
 86
 87-   Python 3.7+
 88-   Node 14+
 89-   pipenv
 90-   yarn
 91
 92You'll probably need to install pipenv with pip, run `pip install pipenv` to
 93get this. Same with yarn for node, `npm install --global yarn`. On some systems
 94you may have to install some additional development files. For example on
 95Ubuntu you will need to install `apt install build-essential`. On Alpine you
 96will need `apk add python3-dev nodejs-dev postgresql-dev gcc musl-dev libffi-dev`.
 97
 98
 99### Development Setup
100
101Once you have all of the above you can get started!
102
103    yarn install
104    pipenv install --dev
105
106After all the dependencies install you can migrate the database and run the
107server.
108
109    pipenv run python manage.py migrate
110    pipenv run python manage.py fake
111    yarn start
112
113Timestrap should now be running at [http://localhost:8000](http://localhost:8000)
114and the test server will automatically recognize and recompile changes to any
115file allowing for quick modification and review.
116
117Once you've made your changes you can share your changes by creating a
118[pull request](https://github.com/overshard/timestrap/pulls)!