https://github.com/andprov/fix_time
Time tracker
https://github.com/andprov/fix_time
django docker gunicorn nginx postgresql python
Last synced: 4 months ago
JSON representation
Time tracker
- Host: GitHub
- URL: https://github.com/andprov/fix_time
- Owner: andprov
- License: mit
- Created: 2023-12-05T18:24:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T18:30:27.000Z (about 2 years ago)
- Last Synced: 2024-05-22T18:59:50.139Z (about 2 years ago)
- Topics: django, docker, gunicorn, nginx, postgresql, python
- Language: Python
- Homepage:
- Size: 299 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FixTime
[](https://opensource.org/license/mit/)
[](https://github.com/psf/black)
[](#)
[](#)
[](#)
[](#)
"Fix time" - A time tracker that allows monitoring the time spent on tasks.
## Features
Time control

Project control

Report

## Installation
### Running the project locally
Clone a repository:
```shell
git clone git clone
```
Go to the project directory:
```shell
cd fix_time
```
Create `.env` file:
```shell
touch .env
```
Template for `.env` file:
```shell
# Django settings
DEBUG=True
SECRET_KEY=
ALLOWED_HOSTS=127.0.0.1;localhost;
# DB
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=fixtime
DB_HOST=db
DB_PORT=5432
# Superuser
ADMIN_USERNAME=admin
ADMIN_EMAIL=admin@admin.com
ADMIN_PASSWORD=admin
```
Deploy the application:
```shell
docker compose -f docker-compose.dev.yml up -d
```
### Running a project on a remote server
To deploy to a remote server, you need to clone the repository to a local machine.
Prepare and upload images to the Docker Pub.
Clone a repository:
```shell
git clone git clone
```
Go to the project directory:
```shell
cd fix_time
```
Create `.env` file:
```shell
touch .env
```
Template for `.env` file:
```shell
# Django settings
DEBUG=False
SECRET_KEY=
ALLOWED_HOSTS=127.0.0.1;localhost;
# SMTP
EMAIL_HOST=
EMAIL_PORT=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
# DB
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=fixtime
DB_HOST=db
DB_PORT=5432
# Docker images
BACKEND_IMAGE=/tracker_back
GATEWAY_IMAGE=/tracker_gateway
# Superuser
ADMIN_USERNAME=admin
ADMIN_EMAIL=admin@admin.com
ADMIN_PASSWORD=admin
```
Create docker images images:
```shell
sudo docker build -t /tracker_back tracker/
sudo docker build -t /tracker_gateway gateway/
```
Upload images to Docker Hub:
```shell
sudo docker push /tracker_back
sudo docker push /tracker_gateway
```
Copy the `.env` and `docker-compose.prod.yml` files to a remote server:
```shell
scp .env docker-compose.prod.yml @:/home//
```
Deploy the application on the server:
```shell
sudo docker compose -f docker-compose.prod.yml up -d
```