Just change `MySuperSecretPassword` to the password you want to use with Postgres, and `~/postgres-data` to the folder where you want to store the database data.
Just change `MySuperSecretPassword` to the password you want to use with Postgres, and `~/postgres-data` to the folder where you want to store the database data.
Then, confirm it is running using `docker ps`
Then, confirm it is running using `docker ps`
```
```
$ docker ps
$ docker ps
│ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
│ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
│ 761a4dddbbc0 postgres:13 "docker-entrypoint.s…" 24 minutes ago Up 22 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp sqm-postgres
│ 761a4dddbbc0 postgres:13 "docker-entrypoint.s…" 24 minutes ago Up 22 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp sqm-postgres
```
```
#### (MacOS, Optional), you can use Homebrew:
#### (MacOS, Optional), you can use Homebrew:
```
```
@ -127,6 +133,7 @@ Bootstrap 5
## Loading Data
## Loading Data
### Loading Survey Item Responses
### Loading Survey Item Responses
SurveyItemResponses is the most important table to understand. SurveyItemResponses is the data that will change year to year and makes up the majority of the database records. Roughly 500,000 SurveyItemResponses per year.
SurveyItemResponses is the most important table to understand. SurveyItemResponses is the data that will change year to year and makes up the majority of the database records. Roughly 500,000 SurveyItemResponses per year.
Some notes:
Some notes:
@ -162,6 +169,7 @@ heroku run:detached -a mciea-beta SFTP_PATH=/data/survey_responses/clean/2022_23
# on heroku production environment
# on heroku production environment
heroku run:detached -a mciea-dashboard SFTP_PATH=/data/survey_responses/clean/2022_23 bundle exec rake data:load_survey_responses_from_path
heroku run:detached -a mciea-dashboard SFTP_PATH=/data/survey_responses/clean/2022_23 bundle exec rake data:load_survey_responses_from_path
```
```
For convenience, you can use the following script for loading data on Heroku:
For convenience, you can use the following script for loading data on Heroku:
```bash
```bash
@ -173,12 +181,14 @@ For convenience, you can use the following script for loading data on Heroku:
```
```
There is also an example one-off task to load a single csv at a time.
There is also an example one-off task to load a single csv at a time.