feat: move to V2

This commit is contained in:
Naramsim 2024-03-25 22:01:11 +01:00
parent f0b51031ae
commit 5a44b4a417
3 changed files with 13 additions and 13 deletions

View file

@ -18,7 +18,7 @@ graphql
.vscode
.github
.circleci
docker-compose.yml
docker-compose*
.dockerignore
/*.md
/*.js

View file

@ -42,38 +42,38 @@ shell: # Load a shell
python manage.py shell ${local_config}
docker-up: # (Docker) Create services/volumes/networks
docker-compose up -d
docker compose up -d
docker-migrate: # (Docker) Run any pending migrations
docker-compose exec -T app python manage.py migrate ${docker_config}
docker compose exec -T app python manage.py migrate ${docker_config}
docker-build-db: # (Docker) Build the database
docker-compose exec -T app sh -c 'echo "from data.v2.build import build_all; build_all()" | python manage.py shell ${docker_config}'
docker compose exec -T app sh -c 'echo "from data.v2.build import build_all; build_all()" | python manage.py shell ${docker_config}'
docker-make-migrations: # (Docker) Create migrations files if schema has changed
docker-compose exec -T app sh -c 'python manage.py makemigrations ${docker_config}'
docker compose exec -T app sh -c 'python manage.py makemigrations ${docker_config}'
docker-flush-db: # (Docker) Removes all the data present in the database but preserves tables and migrations
docker-compose exec -T app sh -c 'python manage.py flush --no-input ${docker_config}'
docker compose exec -T app sh -c 'python manage.py flush --no-input ${docker_config}'
docker-destroy-db: # (Docker) Removes the volume where the database is installed on, alongside to the container itself
docker rm -f pokeapi_db_1
docker volume rm pokeapi_pg_data
docker-shell: # (Docker) Launch an interative shell for the pokeapi container
docker-compose exec app sh -l
docker compose exec app sh -l
docker-stop: # (Docker) Stop containers
docker-compose stop
docker compose stop
docker-down: # (Docker) Stop and removes containers and networks
docker-compose down
docker compose down
docker-test: # (Docker) Run tests
docker-compose exec -T app python manage.py test ${local_config}
docker compose exec -T app python manage.py test ${local_config}
docker-prod:
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f Resources/compose/docker-compose-prod-graphql.yml up -d
docker compose -f docker-compose.yml -f docker-compose.override.yml -f Resources/compose/docker-compose-prod-graphql.yml up -d
docker-setup: docker-up docker-migrate docker-build-db # (Docker) Start services, prepare the latest DB schema, populate the DB
@ -148,4 +148,4 @@ update-graphql-data-prod:
docker compose exec -T web sh -c 'rm -rf /tmp/cache/*'
docker compose start graphql-engine
sleep 120
make hasura-apply
make hasura-apply

View file

@ -6,4 +6,4 @@ services:
context: .
dockerfile: ./Resources/docker/app/Dockerfile
# docker-compose -f docker-compose.yml -f docker-compose-dev.yml up -d
# docker compose -f docker-compose.yml -f docker-compose-dev.yml up -d