Skip to content
Permalink
Browse files

Update the setup docs with feedback from Jacob

  • Loading branch information...
KevinCaseiras committed Jun 4, 2019
1 parent c5b65e3 commit 95fa6d9f2ae241cf7fea091d7234ce39ec6caa3f
Showing with 16 additions and 11 deletions.
  1. +16 −11 docs/backend/index.md
@@ -72,25 +72,36 @@ Clone the Open Legislation codebase to your computer.

### Create Database User

Using example user `openleg` with the password `ol_pass`
Log into psql as the postgres user.

1.`sudo su - postgres`
1.`psql -U postgres`

In psql, create a user with the same name as you linux user.

1. Create a new role in postgres.
`CREATE USER openleg WITH LOGIN PASSWORD ol_pass`
`CREATE USER <<username>> WITH LOGIN SUPERUSER PASSWORD '<<password>>';`

### Create Open Legislation Database

1. Enter psql in a terminal with the database user you created in the previous step: `psql -U openleg postgres`
1. Create a database for Open Legislation: `CREATE DATABSE openleg;`
1. Exit psql with `\q`

## Elasticsearch setup

Add or modify the field `cluster.name` in `/etc/elasticsearch/elasticsearch.yml` to be unique to your openleg instance e.g.
```
cluster.name: sam-openleg
```

## Property Files

Navigate to `src/main/resources` and copy the following files:
* `app.properties.example` -> `app.properties`
* `log4j.properties.example` -> `log4j.properties`
* `log4j2.xml.example` -> `log4j2.xml`
* `flyway.conf.example` -> `flyway.conf`


Also navigate to `src/main/webapp` and copy the following files:
* `grunt.properties.example.json` -> `grunt.properties.json`

@@ -160,12 +171,6 @@ Set `flyway.password` to the database user password.

Set `deployDirectory` to `<<path to OpenLegislation codebase>>/target`

## Elasticsearch setup

Add or modify the field `cluster.name` in `/etc/elasticsearch/elasticsearch.yml` to be unique to your openleg instance e.g.
```
cluster.name: sam-openleg
```

## Building

@@ -179,7 +184,7 @@ We typically run Open Legislation in Tomcat through IntelliJ.
1. Click the plus sign in the top left corner
1. Scroll down until you find Tomcat Server. Select local server
1. In the Server tab -> application server link your download of tomcat from before
1. In the Deployment tab -> hit the plus sign again and select legislation:war exploded
1. In the Deployment tab -> hit the plus sign again and select legislation:war exploded. Set the Application Context to `/`.
1. Apply these changes

Now you can run Tomcat by selecting it and pressing the green play button towards the top right of the Intellij UI.

0 comments on commit 95fa6d9

Please sign in to comment.
You can’t perform that action at this time.