*Note: This setup method is not recommended. To ensure a consistent environment, please check out the Docker Setup Guide.
brew install libmaxminddb automake pkg-config libtool libffi gmp python openssl
git clone https://github.com/gitcoinco/web.git
cd web/app
cp app/local.env app/.env
You will need to edit the app/.env
file with your local environment variables. Look for config items that are marked # required
.
If you plan on using the Github integration, please read the third party integration guide.
If you're testing in a staging or production style environment behind a CDN, pass the DJANGO_STATIC_HOST
environment variable to your django web instance specifying the CDN URL.
For example:
DJANGO_STATIC_HOST='https://gitcoin.co
PostgreSQL is the database used by this application. Here are some instructions for installing PostgreSQL on various operating systems.
Once you have Postgres installed and running on your system, enter into a Postgres session.
psql
Create the database and a new privileged user.
CREATE DATABASE gitcoin;
CREATE USER gitcoin_user WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE gitcoin TO gitcoin_user;
Exit Postgres session
\q
Update .env with the connection details.
DATABASE_URL=psql://gitcoin_user:password@localhost:5432/postgres
virtualenv gcoin
source gcoin/bin/activate
pip install -r requirements/test.txt
./manage.py migrate
./manage.py createcachetable
./manage.py get_prices
./manage.py runserver 0.0.0.0:8000
Navigate to http://localhost:8000/
.
./manage.py createsuperuser
This can be useful if you'd like data to test with:
./manage.py sync_geth
or equivalently:
./manage.py sync_geth rinkeby 402 99999999999