A simple django app made to demonstrate building apis with django-rest-framework
-
Install docker and docker compose (follow the instructions for your platform https://docs.docker.com/compose/install/)
-
Start the server and dependencies
docker-compose up
-
Run database migrations (docker-compose must be running, so use a separate terminal)
docker-compose exec web python manage.py migrate
-
Collect static files and build frontend code
docker-compose exec web python manage.py collectstatic docker-compose exec -w /code/frontend web yarn install docker-compose exec -w /code/frontend web yarn build
-
Create a superuser (this user will have access to the admin interface)
docker-compose exec web python manage.py createsuperuser
follow the instructions to create the user
-
The app should be now accessible in http://localhost:8000
you can access the admin to create new timeline entries in http://localhost:8000/admin and logging in with the superuser you created in step 4