fx: run make command in namespace

This commit is contained in:
Alessandro Pezzè 2021-05-30 22:53:55 +02:00
parent 3ea83d31b5
commit caa946a989
2 changed files with 4 additions and 4 deletions

View file

@ -105,10 +105,10 @@ kustomize-apply: # (Kustomize) Run kubectl apply -k on the connected k8s cluste
kubectl apply -k Resources/k8s/kustomize/
k8s-migrate: # (k8s) Run any pending migrations
kubectl exec deployment/pokeapi -- python manage.py migrate --settings=config.docker-compose
kubectl exec --namespace pokeapi deployment/pokeapi -- python manage.py migrate --settings=config.docker-compose
k8s-build-db: # (k8s) Build the database
kubectl exec deployment/pokeapi -- sh -c 'echo "from data.v2.build import build_all; build_all()" | python manage.py shell --settings=config.docker-compose'
kubectl exec --namespace pokeapi deployment/pokeapi -- sh -c 'echo "from data.v2.build import build_all; build_all()" | python manage.py shell --settings=config.docker-compose'
k8s-delete: # (k8s) Delete pokeapi namespace
kubectl delete namespace pokeapi

View file

@ -72,7 +72,7 @@ make wipe_db
## Docker and Compose
There is also a multi-container setup, managed by [Docker Compose](https://docs.docker.com/compose/). This setup allows you to deploy a production-like environment, with separate containers for each services and is recommended if you need to simply spin up PokeAPI.
There is also a multi-container setup, managed by [Docker Compose](https://docs.docker.com/compose/). This setup allows you to deploy a production-like environment, with separate containers for each services and is recommended if you need to simply spin up PokéAPI.
Start everything by
@ -96,7 +96,7 @@ Browse [localhost/api/v2/](http://localhost/api/v2/) or [localhost/api/v2/pokemo
<img width="100px" src="https://graphql-engine-cdn.hasura.io/img/powered_by_hasura_blue.svg" />
</a>
When you start PokeAPI with the above docker-compose setup, an [Hasura Engine](https://github.com/hasura/graphql-engine) server is started as well. It's possible to track all the PokeAPI tables and foreign keys by simply
When you start PokéAPI with the above docker-compose setup, an [Hasura Engine](https://github.com/hasura/graphql-engine) server is started as well. It's possible to track all the PokeAPI tables and foreign keys by simply
```sh
# hasura cli needs to be installed and available in your $PATH: https://hasura.io/docs/latest/graphql/core/hasura-cli/install-hasura-cli.html