-
Clone this repository with:
git clone --recurse-submodules [email protected]:skoleapp/skole.git -
cd skole -
Build the images:
docker-compose build -
Setup the backend for development (alternatively just run
yarn backend:setup):docker-compose run --rm backend sh -c \ 'python manage.py migrate \ && python manage.py compilemessages \ && python manage.py loaddata skole/fixtures/*.yaml' -
Run the app:
docker-compose up -
Access the application from localhost:3001, log in with username:
testuser2password:password
Access Django admin from localhost:8000, log in with username:adminpassword:admin
Access GraphiQL from localhost:8000/graphql
- To build images, run
yarn build. - To start containers in development, run
yarn start. - To start containers in a production like setup, run
yarn start-prodlike. NOTE: This has no code volumes so changes won't get updated without rebuilding. - To build images for a production like setup, run
yarn build-prodlike. - To make migrations, run
yarn backend:makemigrations. - To migrate db, run:
yarn backend:migrate. - To create superuser, run
yarn backend:create-superuser. - To import test data, run
yarn backend:import-test-data. - To make messages in the backend, run
yarn backend:makemessages. - To compile messages in the backend, run
yarn backend:compilemessages. - To run migrations, compile messages, and import test data in the backend, run
yarn backend:setup. - To run tests and type checks in the backend, run
yarn backend:test. - To run type-checking in the backend, run
yarn backend:type-check. - To run linting in the backend, run
yarn backend:lint. - To run formatting in the backend, run
yarn backend:format.
- Copy the template env file:
cp .env.template .envand add values for the <placeholder> variables in the.envfile. - (Optional) If you want to test PDF file conversion during development, you will need a Cloudmersive API key, which you can get here.
- (Optional) If you want to test push notificatons during development, you will need a Firebase Cloud Messaging Server key, which you can get here.
- Make sure your computer and mobile device are in the same network.
- Make sure your computer's firewall is not blocking incoming requests.
- Check your WiFi inet address using e.g.
ipconfig getifaddr en0and replace theAPI_URLenv variable with http://<your_wifi_inet>:8000/ - That's it, now you should be able to connect on the dev server locally with your mobile device at http://<your_wifi_inet>:3001/
- Run
docker-compose build frontend - Run
docker-compose up -V, (same as--renew-anow-volumes) this forces the anonymousnode_modulesvolume to update its contents from the freshly built image. - 🍻