Skip to content

Commit db0811d

Browse files
Updates README.md
1 parent 67a9740 commit db0811d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Spring Boot REST API: Blog
22
RESTful API for blog with posts, comments, authorization/authentication using Java/Spring Boot
33
---
4-
## *Branch `main` is setup to work with a PostgreSQL database, for deployment to Heroku* - live project [here!](https://blog-api-springboot-c301743401b3.herokuapp.com/swagger-ui/index.html)
4+
## *Branch `main` is setup to work with a PostgreSQL database, for deployment to Heroku. The `application.properties` file is also setup to accomodate this* - live project [here!](https://blog-api-springboot-c301743401b3.herokuapp.com/swagger-ui/index.html)
55

66
### To run locally:
77
- Clone the project to your local machine, and install the dependencies.
@@ -26,20 +26,23 @@ Alternatively, use Intellij IDEA and simply run the application from within the
2626

2727
- __Required environment variables:__
2828
- your `application.properties` file requires the use of the following variables:
29-
- POSTGRES_USER
30-
- POSTGRES_PASSWORD
29+
- JDBC_DATABASE_URL
30+
- If running locally the format of this url should be:
31+
- `jdbc:postgresql://localhost:5432/my-database-name?createDatabaseIfNotExist=true`
32+
- JDBC_DATABASE_USERNAME
33+
- JDBC_DATABASE_PASSWORD
3134
- JWT_SECRET
3235
- Either enter these directly into the `application.properties` file by replacing the respective variable name with same plaintext, or associate the variables correctly using a `.env` file. Alternatively, you can easily [set these variables directly](https://www.jetbrains.com/help/objc/add-environment-variables-and-program-arguments.html) through the Intellij IDEA IDE.
3336

3437
- __Use of .env file for Docker__
3538
- The `docker-compose.yml` file will look for a `.env` as well, specifically for the `POSTGRES_PASSWORD`. Make sure this file is created in the root directory of the project. This will be the password assigned to your mysql database that will run in a Docker container.
36-
- __*NOTE:*__ POSTGRES_PASSWORD must match exactly environment variable of the same name in the `application.properties` file.
39+
- __*NOTE:*__ JDBC_DATABASE_PASSWORD must match exactly environment variable of the same name in the `application.properties` file.
3740

3841
- This will be the password assigned to your mysql database that will run in a Docker container. Your `docker-compose.yml` file is expecting it, and your `application.properties` currently requires it.
3942

4043

4144

42-
### Note 2: Requires Docker
45+
### Note 2: Requires Docker to run locally
4346
- Install Docker Desktop
4447
- Make sure Docker Desktop is running
4548
- Use Docker compose to start the container that holds your database:

0 commit comments

Comments
 (0)