mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
Add documentation
This commit is contained in:
parent
d1b85e9ca9
commit
7250e6587c
2 changed files with 45 additions and 1 deletions
|
@ -586,3 +586,47 @@ Example: `cf ssh getgov-za`
|
|||
| | Parameter | Description |
|
||||
|:-:|:-------------------------- |:----------------------------------------------------------------------------|
|
||||
| 1 | **debug** | Increases logging detail. Defaults to False. |
|
||||
|
||||
|
||||
## Populate First Ready
|
||||
This section outlines how to run the `populate_organization_type` script.
|
||||
|
||||
### Running on sandboxes
|
||||
|
||||
#### Step 1: Login to CloudFoundry
|
||||
```cf login -a api.fr.cloud.gov --sso```
|
||||
|
||||
#### Step 2: SSH into your environment
|
||||
```cf ssh getgov-{space}```
|
||||
|
||||
Example: `cf ssh getgov-za`
|
||||
|
||||
#### Step 3: Create a shell instance
|
||||
```/tmp/lifecycle/shell```
|
||||
|
||||
#### Step 4: Running the script
|
||||
```./manage.py populate_organization_type {domain_election_office_filename} --debug```
|
||||
|
||||
- The domain_election_office_filename file must adhere to this format:
|
||||
- example.gov\
|
||||
example2.gov\
|
||||
example3.gov
|
||||
|
||||
Example:
|
||||
`./manage.py populate_organization_type migrationdata/election-domains.csv --debug`
|
||||
|
||||
### Running locally
|
||||
```docker-compose exec app ./manage.py populate_organization_type {domain_election_office_filename} --debug```
|
||||
|
||||
Example (assuming that this is being ran from src/):
|
||||
`docker-compose exec app ./manage.py populate_organization_type migrationdata/election-domains.csv --debug`
|
||||
|
||||
##### Required parameters
|
||||
| | Parameter | Description |
|
||||
|:-:|:------------------------------------|:-------------------------------------------------------------------|
|
||||
| 1 | **domain_election_office_filename** | A file containing every domain that is an election office.
|
||||
|
||||
##### Optional parameters
|
||||
| | Parameter | Description |
|
||||
|:-:|:-------------------------- |:----------------------------------------------------------------------------|
|
||||
| 1 | **debug** | Increases logging detail. Defaults to False.
|
|
@ -33,7 +33,7 @@ class Command(BaseCommand):
|
|||
parser.add_argument("--debug", action=argparse.BooleanOptionalAction)
|
||||
parser.add_argument(
|
||||
"domain_election_office_filename",
|
||||
help=("A JSON file that holds the location and filenames" "of all the data files used for migrations"),
|
||||
help=("A file that contains" " all the domains that are election offices."),
|
||||
)
|
||||
|
||||
def handle(self, domain_election_office_filename, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue