Skip to content

Hyperbach/1gency-app

Repository files navigation

1gency-app

Useful commands:

./commands.py - A simple utility for executing commands on a server or inside a docker container. Just run:
./commands.py --help

docker-compose:

docker compose up or docker compose up -d

docker compose stop

docker compose build

docker compose logs or docker compose logs backend

docker compose logs --tail 10

Create the first user in database:

docker exec -it 1gency-app-backend bash

Then execute inside the container:

./commands.py createuser --username=YourUsername --password=YourPassword --is-super

connect to DB:

docker exec -it 1gency-app-db psql -U python upwork_tools -p 5434

create dump:

docker exec -it 1gency-app-db pg_dump -U python upwork_tools -p 5434 > dump-`date +%Y-%m-%d_%H:%m:%S`.bak

Recreating a database inside a DB docker container from a dump

cd scripts
./recreate_db.sh dump_file_name

where dump_file_name can be a file or a symbolic link to file which from you want imported to. During the run of the recreate_db.sh script, the old (existing) database will be backed up into a file named ./existing-YYYY-mm-dd_hh_MM_ss.bak

For further info, click either backend or client. Thanks.

Initial dev environment setup

# Build and start the containers:
sudo docker compose up -d --build

# Then create a user:
sudo docker compose exec backend ./commands.py createuser --username admin --password admin --is-super

# Obtain your auth token:
token=$(curl --request POST \
             --header 'Content-Type: application/json' \
             --data-raw '{"username": "admin", "password": "admin"}' \
             http://localhost:5000/api/login/ | python3 -c 'import sys, json; print(json.load(sys.stdin)["token"])')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •