"Fix time" - A time tracker that allows monitoring the time spent on tasks.
Clone a repository:
git clone git clone <https or SSH URL>Go to the project directory:
cd fix_timeCreate .env file:
touch .envTemplate for .env file:
# Django settings
DEBUG=True
SECRET_KEY=<django_secret_key>
ALLOWED_HOSTS=127.0.0.1;localhost;<example.com;xxx.xxx.xxx.xxx>
# 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=adminDeploy the application:
docker compose -f docker-compose.dev.yml up -dTo 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:
git clone git clone <https or SSH URL>Go to the project directory:
cd fix_timeCreate .env file:
touch .envTemplate for .env file:
# Django settings
DEBUG=False
SECRET_KEY=<django_secret_key>
ALLOWED_HOSTS=127.0.0.1;localhost;<example.com;xxx.xxx.xxx.xxx>
# SMTP
EMAIL_HOST=<smtp.example.com>
EMAIL_PORT=<port>
EMAIL_HOST_USER=<username>
EMAIL_HOST_PASSWORD=<password>
# DB
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=fixtime
DB_HOST=db
DB_PORT=5432
# Docker images
BACKEND_IMAGE=<username>/tracker_back
GATEWAY_IMAGE=<username>/tracker_gateway
# Superuser
ADMIN_USERNAME=admin
ADMIN_EMAIL=admin@admin.com
ADMIN_PASSWORD=adminCreate docker images images:
sudo docker build -t <username>/tracker_back tracker/
sudo docker build -t <username>/tracker_gateway gateway/Upload images to Docker Hub:
sudo docker push <username>/tracker_back
sudo docker push <username>/tracker_gatewayCopy the .env and docker-compose.prod.yml files to a remote server:
scp .env docker-compose.prod.yml <username>@<server_address>:/home/<username>/<app_name>Deploy the application on the server:
sudo docker compose -f docker-compose.prod.yml up -d