docs: add instructions on setting up a development environment
This commit is contained in:
parent
33243b77ba
commit
3fae2365bf
1 changed files with 43 additions and 1 deletions
44
README.md
44
README.md
|
@ -12,7 +12,49 @@ Development Setup
|
|||
-----------------
|
||||
|
||||
For development, it is possible to use SQLite and a single host.
|
||||
More documentation to follow on this later.
|
||||
|
||||
Create and activate a Python virtual environment:
|
||||
|
||||
```
|
||||
python3 -m venv venv
|
||||
source ./venv/bin/activate
|
||||
```
|
||||
|
||||
Install the Python packages needed by the application:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
pip install psycopg2-binary
|
||||
```
|
||||
|
||||
Set up the database:
|
||||
|
||||
```
|
||||
flask db init
|
||||
flask db upgrade
|
||||
```
|
||||
|
||||
Before the application can be run, it will need to be configured.
|
||||
Run `cp config.yaml.example config.yaml`, and edit it accordingly. Note that at least one could provider must be configured for the application to run.
|
||||
To run the application:
|
||||
|
||||
```
|
||||
flask run --host=0.0.0.0 --port=5000
|
||||
```
|
||||
|
||||
### New frontend
|
||||
To use the new portal frontend:
|
||||
|
||||
```bash
|
||||
git clone https://gitlab.com/guardianproject-ops/bypass-censorship/portal-frontend.git frontend
|
||||
cd frontend
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
mkdir -p ../app/static/ui
|
||||
cp -r dist/* ../app/static/ui
|
||||
```
|
||||
|
||||
|
||||
Copyright
|
||||
---------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue