Note: uncomment the line with SECRET_KEY in your secure.py and replace the value with some valid string (for this dev server any string is fine, but you can google how to get a proper key if you want)
Modify the PostGres port in docker_local.docker-compose.yml to avoid port conflict (optional, but probably necessary)
If running UpGrade backend, port 5432 will conflict as the postgres default port. The quick modification to allow running both is to change ports value in docker_local.docker-compose.yml from 5432:5432 to 5433:5432 like so:
Launch the container
cd mooclet_engine # you will run this from the dir of the docker compose file (mooclet-engine/mooclet_engine notice the sneaky hyphen and underscore!)
docker-compose -f docker_local.docker-compose.yml --env-file ./docker_local.env up --build
If that is successful, you will see this in the mooclet-api logs, this is the API up and ready for business:
Generated token <some-token> for user mooclet_admin
Watching for file changes with StatReloader
Use the generated API token in upgrade .env
Plunk that token in your Upgrade .env file for MOOCLETS_API_TOKEN. If you don't have the other values your env, you will need these, they will not need modified:
Note also that if UpGrade is also running in a container, you will need to modify MOOCLETS_HOST_URL as well to help docker map to it's internal "localhost":
Launch/restart UpGrade. If both applications can start up, you should be able to test out the connection by sending this via postman request. This will use UpGrade's API to proxy a call to Mooclet API (may likely need to set the Upgrade Authorization Bearer token). If success, you're up and running. π