-
Create and activate a Python virtual environment using Python 3.11:
python3.11 -m venv <virtual-env-path> source <virtual-env-path>/bin/activate # On Windows, use <virtual-env-path>\Scripts\activate
-
Install the required dependencies:
pip install -r requirements-dev.txt
-
Install Git hooks:
pre-commit install pre-commit run -a
-
Create an environment file and edit the settings as needed:
cp .env_template .env
-
Set the following environment variables in the
.env
file:DATABASE_URL= DEBUG=True
6. **Run local services with docker-compose**
```bash
docker compose up
-
Run Django migrations and start the development server:
./manage.py migrate ./manage.py runserver
(requires Ruby)
gem install kamal -v '~> 1.9.2'
See https://developer.1password.com/docs/cli/get-started/
Note: Do not use Flatpack or snap to install 1password CLI as these do not work with the SSH agent.
You will also need to update the 1Password configuration to allow it to access the SSH key:
~/.config/1Password/ssh/agent.toml
[[ssh-keys]]
vault = "Commcare Connect"
See https://developer.1password.com/docs/ssh/agent for more details.
To test that this is working you can run:
aws configure sso --profile commcare-connect
aws sso login --profile commcare-connect
Note: If you used a different profile name you will need to set the AWS_PROFILE
environment variable to the profile name.
To deploy run kamal deploy
from within the deploy
directory. Make sure you are on the main
branch and have pulled the latest code.