-
Install Git
-
Install & Run Redis.
-
Install & Run Postgresql
-
Install pyenv to manage python versions. (Instructions for Ubuntu)
NOTE: This repository has been tested to run on Python
3.9.x
-
Install python 3.9 with pyenv:
pyenv install 3.9.11
To set Python 3.9 as the global python, run:
pyenv global 3.9.11
-
Install pyenv-virtualenv (Installation instructions for Ubuntu)
-
Install Yarn
-
git clone
this repo to your machine. -
Setup your python virtual environment
pyenv virtualenv 3.9.11 dimagi.com
-
Activate your
python
virtual environment NOTE: You will need to do this each time you plan on running this setup locally.pyenv activate dimagi.com
-
Install
pipenv
pip install pipenv
-
Install
Pipfile
dependenciespipenv install
Note: if this fails and you are on Ubuntu, you should also make sure to install the following system dependencies
sudo apt-get install libpq-dev
-
Install Yarn dependencies
yarn install
-
Install postcss
sudo npm install -g fs-extra # for ubuntu only sudo npm install -g postcss-cli sudo npm install -g autoprefixer
-
Create a
.env
file, and make any necessary edits.cp dev.env .env
-
Initialize the database
manage.py createdb
-
Run the server using
manage.py runserver
-
Install the Heroku CLI.
-
Login with the Heroku CLI to your invited heroku account that manages the dimagidotcom app. Make sure to add your keys with the CLI. These instructions should have been emailed to you with the Heroku team member invite.
-
Make sure you followed the steps from Getting Started Locally
-
Set up your origins:
git remote add heroku-prod https://git.heroku.com/dimagidotcom.git
git remote add heroku-staging https://git.heroku.com/dimagidotcom-staging.git
- Deploy to production via command line:
git push heroku-prod master
Or Deploy to production from the web UI under the Deploy tab.
- Deploying
master
toheroku-staging
will automatically trigger a build but if you want to build a specific branch on staging, first push that branch to github, and then manually Deploy that branch from the [Heroku web UI](https://dashboard.heroku.com/apps/dimagidotcom-staging/deploy/github.
Are </div>
(and other deeply nested) tags properly commented with a selector for easy identification?
<div class="content">
...
</div> {# .content #}
Is all human readable text in a {% blocktrans %}
?
{% blocktrans %}
Human Readable Text!
{% endblocktrans %}