python -m venv env source env/bin/activate
https://flask.palletsprojects.com/en/2.2.x/installation/ pip install -U Flask pip install -U Flask-SQLAlchemy pip install psycopg2
export FLASK_APP=project/init.py export FLASK_DEBUG=1 python manage.py run
docker-compose -f docker-compose-dev.yml build docker-compose -f docker-compose-dev.yml up -d
docker-compose -f docker-compose-dev.yml up -d
docker-compose -f docker-compose-dev.yml up -d --build
docker-compose -f docker-compose-dev.yml logs
chmod +x services/users/entrypoint.sh chmod +x services/users/entrypoint-prod.sh
docker-compose -f docker-compose-dev.yml
run users python manage.py recreate-db
docker exec -ti $(docker ps -aqf "name=users-db") psql -U postgres
\c users_dev \dt \q
docker-compose -f docker-compose-dev.yml up -d
docker-compose -f docker-compose-dev.yml
run users python manage.py recreate-db
docker-compose -f docker-compose-dev.yml
run users python manage.py test
docker-compose -f docker-compose-dev.yml
run users python manage.py seed-db
docker-compose -f docker-compose-prod.yml run users env
docker-compose -f docker-compose-prod.yml up -d --build
docker-compose -f docker-compose-prod.yml up -d
docker-compose -f docker-compose-prod.yml
run users python manage.py recreate-db
docker-compose -f docker-compose-prod.yml
run users python manage.py seed-db
docker-compose -f docker-compose-prod.yml up -d --build nginx
docker-compose -f docker-compose-dev.yml up -d --build nginx
docker-compose -f docker-compose-dev.yml up -d --build
docker-compose -f docker-compose-dev.yml
run users python manage.py test
docker-compose -f docker-compose-dev.yml
run users python manage.py db init
docker-compose -f docker-compose-dev.yml
run users python manage.py db migrate
docker-compose -f docker-compose-dev.yml
run users python manage.py db upgrade
source ~/.bashrc
// stop containers
docker-compose -f docker-compose-dev.yml stop
// bring down containers
docker-compose -f docker-compose-dev.yml down
// force build
docker-compose -f docker-compose-dev.yml build --no-cache
// remove images
docker rmi $(docker images -q)
// access DB via psql
docker exec -ti users-db psql -U postgres -W
// update containers
docker-compose -f docker-compose-dev.yml up -d
// build containers
docker-compose -f docker-compose-dev.yml up -d --build
// run coverage
docker-compose -f docker-compose-dev.yml \
run users python manage.py cov
// run linters
docker-compose -f docker-compose-dev.yml \
run users flake8 project --exclude env
// build client
docker-compose -f docker-compose-dev.yml up --build -d client
// init logs
docker-compose -f docker-compose-dev.yml logs -f
// run test server from the needed build folder
python3 -m http.server
// stop container
docker stop CONTAINER_ID
// remove container
docker rm CONTAINER_ID
// remove image
docker rmi test
// build prod
docker-compose -f docker-compose-prod.yml up -d --build