Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md with Build Instructions #737

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 10 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,52 +58,16 @@ Email: [email protected]

### Step 1: Download and Install the following Software and Dependencies
- [IntelliJ IDEA Ultimate](https://www.jetbrains.com/idea/download/)
- [MySQL Server](https://dev.mysql.com/downloads/mysql/)
- [MySQL Workbench](https://dev.mysql.com/downloads/workbench/)
- [Java JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
- [Git](http://git-scm.com/)

### Step 2: Clone the repo and checkout super-femr branch
### Step 2: Clone the repo
- `git clone https://github.com/FEMR/femr.git`
- `git checkout super-femr`

### Step 3: Setting up the DB
1. Make sure your MySQL server is running on your machine.
2. Open the MySQL Workbench.
3. Select the db icon to create a new schema and call it `femr_db`.

<details> <summary> screenshot </summary>

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/mysqlworkbench1.png?raw=true)

</details>

4. Under the Administration tab, select `User and Priviliges`. Then `Add account` and add `Login name` and `Password` of your preference. Save the login and password because you will need it in the later steps.
- For this example, the username is `testing` and password is `password`.

<details> <summary> screenshot </summary>

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/mysqlworkbench2.png?raw=true)

</details>

5. Then go to the `Schema Privileges` tab, select `Add Entry...` for the user you created in the previous step, and select the `femr_db` schema.

<details> <summary> screenshot </summary>

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/mysqlworkbench3.png?raw=true)

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/mysqlworkbench4.png?raw=true)

</details>

6. Give all of the rights, except the `GRANT OPTION`.

<details> <summary> screenshot </summary>

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/mysqlworkbench5.png?raw=true)

</details>
1. Ensure Docker Desktop is running
2. Open a terminal at the repository root
3. Run `docker-compose up db` to bring up the database. To stop the database use Ctrl+c

### Step 4: Configuring IntelliJ

Expand All @@ -112,39 +76,24 @@ Email: [email protected]
2. In IntelliJ IDEA Ultimate and go to `Preferences` -> `Plugins` -> click `Marketplace` -> Then download `Scala` and `Play Framework`. Then restart the IDE.

3. Inside `femr/conf` folder, create a new file named `application.dev.conf`.
4. Copy the following settings inside and save it. Note that `db.default.username` and `db.default.password` values must match the account and password from the Step 3.3. For this example, my username is `testing` and password is `password`.

```
include "application.conf"
settings.researchOnly=0
db.default.url="jdbc:mysql://127.0.0.1:3306/femr_db?characterEncoding=UTF-8&useSSL=false"
db.default.username="testing"
db.default.username="femr"
db.default.password="password"
photos.defaultProfilePhoto="./public/img/defaultProfile.png"
csv.path="./Upload/CSV"
```

5. Go to `Run` -> `Edit Configurations` -> click on the `+` sign -> `Play 2 App`.
4. Go to `Run` -> `Edit Configurations` -> click on the `+` sign -> `Play 2 App`.
- If `Play 2 App` doesn't appear, try restarting the IDE.

<details> <summary> screenshot </summary>

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/intellij5.png?raw=true)

</details>

6. Then, click on `Edit Environment Variables` -> add the following two environment variables: `user.dir` and `config.file` (make sure to change the value based on where the two are stored on your local machine). Then click apply and ok.
- `config.file` is the path for application.dev.conf.
- `user.dir` is the path for the project.

<details> <summary> screenshot </summary>

![Image](https://github.com/kylene-phillips/femr-installation/blob/gh-pages/images/intellij6.png?raw=true)

</details>
5. In the JVM options of the configuration add `-Dconfig.resource=application.dev.conf` to the end.


7. Go to `File` -> `Project structure` -> Under the `Project` tab -> Select `Project SDK` and set it to 1.8.
6. Go to `File` -> `Project structure` -> Under the `Project` tab -> Select `Project SDK` and set it to 1.8.
- You can download 1.8 directly from IntelliJ. If so, choose 1.8 Amazon Correto.

<details> <summary> screenshot </summary>
Expand All @@ -162,7 +111,7 @@ csv.path="./Upload/CSV"
</details>

9. On the rightmost side of IntelliJ, if there is a vertical line containing sbt. Click on the sbt tab and then click the refresh symbol.
- If there isn’t sbt on the right, remove the .idea folder from the root directory of the project. In the command line, traverse to the root directory and do: rm -r .idea. Then redo step 2 and then continue. If still does not work try removing the project and recloning it again.
- If there isn’t sbt on the right, remove the .idea folder from the root directory of the project. In the command line, traverse to the root directory and do: rm -r .idea. Then redo step 2 and then continue. If still does not work try invaliadating IntelliJ's cache.

<details> <summary> screenshot </summary>

Expand Down
Loading