The moment you've all been waiting for...is here!
- Python 3.6
- MySQL 8.0.18
- The Python packages listed below:
- gunicorn
- falcon
- pytest (development only)
- pylint (development only)
- sentry-sdk[falcon]==0.13.1
or
- Docker
For any of the below methods, environment files need to be created to tell the application how to access Sentry, if desired. The following environment files are needed:
.sentry_dsn
(optional, for logging errors in Sentry)
These files do not follow the envfile
convention, they instead
follow the Docker secrets convention of only containing the value itself. So
instead of putting KEY=VALUE
, simply put VALUE
.
- Open the file
docker-compose-local-image.yml
. For theimage:
line, edit this to point to the URL of the image you want from the Container Repository. The value after the colon can be a commit UUID, a tag name, or a branch name. - Login to the repository via Docker via
docker login registry.gitlab.com -u <gitlabUsername> -p <accessToken>
, whereaccessToken
is an API token created from here. Only theAPI access
permission is needed. - Run the command
docker-compose -f docker-compose.yml -f docker-compose-local-image.yml up
in the project root directory, or usedocker-compose --build -f docker-compose.yml -f docker-compose-local-image.yml up -d
to run it as a daemon.
- Run the command
docker-compose -f docker-compose.yml -f docker-compose-local.yml up
in the project root directory, or usedocker-compose -f docker-compose.yml -f docker-compose-local.yml up -d
to run it as a daemon.
- If running interactively, simply kill the application with
Ctrl+C
. - To remove the container, run
docker-compose -f docker-compose.yml -f docker-compose-local.yml down
. - If you've made changes and want to re-build, run the above commands with
--build
appended to force a re-build.
- Run
pip install -r seniorproject/requirements.txt
from the root of the project directory. - Then, run the application using the command
gunicorn seniorproject.api:API
.
- You can kill the application with
Ctrl+C
.