-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,162 +1 @@ | ||
# First Time Setup | ||
|
||
## Using Pipenv [Recommended] | ||
|
||
``` | ||
# Install dependencies | ||
pipenv install | ||
# Create a virtual environment | ||
pipenv shell | ||
# Initialize the database | ||
flask --app app.web init-db | ||
``` | ||
|
||
## Using Venv [Optional] | ||
|
||
These instructions are included if you wish to use venv to manage your evironment and dependencies instead of Pipenv. | ||
|
||
``` | ||
# Create the venv virtual environment | ||
python -m venv .venv | ||
# On MacOS, WSL, Linux | ||
source .venv/bin/activate | ||
# On Windows | ||
.\.venv\Scripts\activate | ||
# Install dependencies | ||
pip install -r requirements.txt | ||
# Initialize the database | ||
flask --app app.web init-db | ||
``` | ||
|
||
# Running the app [Pipenv] | ||
|
||
There are three separate processes that need to be running for the app to work: the server, the worker, and Redis. | ||
|
||
If you stop any of these processes, you will need to start them back up! | ||
|
||
Commands to start each are listed below. If you need to stop them, select the terminal window the process is running in and press Control-C | ||
|
||
### To run the Python server | ||
|
||
Open a new terminal window and create a new virtual environment: | ||
|
||
``` | ||
pipenv shell | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
inv dev | ||
``` | ||
|
||
### To run the worker | ||
|
||
Open a new terminal window and create a new virtual environment: | ||
|
||
``` | ||
pipenv shell | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
inv devworker | ||
``` | ||
|
||
### To run Redis | ||
|
||
``` | ||
redis-server | ||
``` | ||
|
||
### To reset the database | ||
|
||
Open a new terminal window and create a new virtual environment: | ||
|
||
``` | ||
pipenv shell | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
flask --app app.web init-db | ||
``` | ||
|
||
# Running the app [Venv] | ||
|
||
_These instructions are included if you wish to use venv to manage your evironment and dependencies instead of Pipenv._ | ||
|
||
There are three separate processes that need to be running for the app to work: the server, the worker, and Redis. | ||
|
||
If you stop any of these processes, you will need to start them back up! | ||
|
||
Commands to start each are listed below. If you need to stop them, select the terminal window the process is running in and press Control-C | ||
|
||
### To run the Python server | ||
|
||
Open a new terminal window and create a new virtual environment: | ||
|
||
``` | ||
# On MacOS, WSL, Linux | ||
source .venv/bin/activate | ||
# On Windows | ||
.\.venv\Scripts\activate | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
inv dev | ||
``` | ||
|
||
### To run the worker | ||
|
||
Open a new terminal window and create a new virtual environment: | ||
|
||
``` | ||
# On MacOS, WSL, Linux | ||
source .venv/bin/activate | ||
# On Windows | ||
.\.venv\Scripts\activate | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
inv devworker | ||
``` | ||
|
||
### To run Redis | ||
|
||
``` | ||
redis-server | ||
``` | ||
|
||
### To reset the database | ||
|
||
Open a new terminal window and create a new virtual environment: | ||
|
||
``` | ||
# On MacOS, WSL, Linux | ||
source .venv/bin/activate | ||
# On Windows | ||
.\.venv\Scripts\activate | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
flask --app app.web init-db | ||
``` |