- Docker and Docker Compose
- Poetry (https://python-poetry.org/docs/#installation)
- Python 3.10 installed locally
- Designsafe dev certificate authority configured as a trusted CA (refer to main portal readme)
- Update your /etc/hosts file by adding this line:
127.0.0.1 ds-download.test
- Clone the Git repository and
cd
into it. - Run
poetry install
to install dependencies locally. If you receive an error about a Python version mismatch, runpoetry env use $PATH_TO_PYTHON_3.10_INSTALL
. - Build the dev image with
docker-compose -f docker-compose.dev.yml build server
- Run the server with
docker-compose -f docker-compose.dev.yml up
- Confirm that the server is running by accessing the test message at
https://ds-download.test
For simplicity the Dockerfile uses a requirements.txt
exported from Poetry. To add a new dependency:
- Run
poetry add $NEW_DEPENDENCY
. - Run
poetry export > requirements.txt
in the repository root. - Rebuild the dev image with
docker-compose -f docker-compose.dev.yml build server