Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ollioddi committed Nov 3, 2023
1 parent c49330a commit 8b4de92
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# P3-BM-dashboard
#### Run docker in production
docker compose --profile prod up --build

- "prod" is the profile which runs the backend in docker.
- spring-boot run does not run the backend in docker. It skips building.
- --build forces a new build.
## Running the backend (developing)
1. Enter the backend directory with `cd /backend`
2. Run the application with `mvn spring-boot:run`
- Spring boot will run "docker compose up" with the "frontend" profile.
- This will launch a `mongodb` database container
3. Stop the application by exiting the terminal, or issuing `mvn spring-boot:stop`

## Building and running with Docker Compose
1. Enter the projects root directory
2. Use `docker compose up --build`
- This will force a `--build` instead of pulling.
- Docker compose will **built** and start a `spring-boot` container.
- Docker compose will **pull** and start the `mongodb` container.
3. Use `docker compose down` to stop the containers together.

0 comments on commit 8b4de92

Please sign in to comment.