You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Spring Boot REST API: Blog
2
2
RESTful API for blog with posts, comments, authorization/authentication using Java/Spring Boot
3
3
---
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)
5
5
6
6
### To run locally:
7
7
- 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
26
26
27
27
-__Required environment variables:__
28
28
- 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:
- 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.
33
36
34
37
-__Use of .env file for Docker__
35
38
- 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.
37
40
38
41
- 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.
39
42
40
43
41
44
42
-
### Note 2: Requires Docker
45
+
### Note 2: Requires Docker to run locally
43
46
- Install Docker Desktop
44
47
- Make sure Docker Desktop is running
45
48
- Use Docker compose to start the container that holds your database:
0 commit comments