the bridge collapsed :(
cp .env.example .env
# override values in .env if necessary
docker-compose up -d --build
The app will run by default on port 8000. This can be configured in
through the .env
file.
docker-compose exec web yarn add <dep>
docker-compose exec app pip install <dep><version>
# example
# docker-compose run app pip install numpy~=1.20.0
docker-compose up -d --build
# backend
docker-compose exec app python manage.py graphql_schema
# frontend
docker-compose exec web yarn run gql
# create migrations
docker-compose exec app python manage.py makemigrations
# apply migrations
docker-compose exec app python manage.py migrate
# get a python django shell
docker-compose exec app python manage.py shell_plus
# format python code
docker-compose exec app riot run -s fmt
# lint python code
docker-compose exec app riot run -s lint
# lint yaml
docker-compose exec app riot run -s yaml_lint
# type check
docker-compose exec app mypy .
# format ts/js code
docker-compose exec web yarn fmt
# lint ts/js code
docker-compose exec web yarn lint
# execute a shell in the server container
docker-compose exec app fish
# get the logs from the app
docker-compose logs -f app web
docker-compose exec app python manage.py shell_plus
User.objects.get(username="<user>").token
- go to
http://localhost:8000/gql/?mem=<token printed above>
Note the trailing slashes in these URLs!
- graphiql explorer: http://localhost:8000/gql/
- wagtail admin http://localhost:8000/admin/
- django admin http://localhost:8000/django-admin/
For now deploys are manual.
ssh into the server and then
cd prod
git pull
docker-compose up -d --build