Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lamiaaali/petclinic-final-project
depi DevOps Project
https://github.com/lamiaaali/petclinic-final-project
Last synced: 23 days ago
JSON representation
depi DevOps Project
- Host: GitHub
- URL: https://github.com/lamiaaali/petclinic-final-project
- Owner: lamiaaali
- Created: 2024-10-24T09:28:44.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T23:19:04.000Z (3 months ago)
- Last Synced: 2024-10-26T11:16:47.123Z (3 months ago)
- Language: Java
- Homepage:
- Size: 2.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Understanding the Spring Petclinic application with a few diagrams
## Running petclinic locally
Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/). You can build a jar file and run it from the command line:```
git clone https://github.com/spring-projects/spring-petclinic.git
cd spring-petclinic
./mvnw package
java -jar target/*.jar
```You can then access petclinic here: http://localhost:8080/
Or you can run it from Maven directly using the Spring Boot Maven plugin. If you do this it will pick up changes that you make in the project immediately (changes to Java source files require a compile as well - most people use an IDE for this):
```
./mvnw spring-boot:run
```## In case you find a bug/suggested improvement for Spring Petclinic
Our issue tracker is available here: https://github.com/spring-projects/spring-petclinic/issues
## Running Petclinic using DockerInside the Dockerfile, create the last line as:
ENTRYPOINT [ "sh", "-c", "java -Dspring.profiles.active=${ENV} -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
Create a docker image and push it to the Docker Hub
And while running the docker:
```
docker run --env ENV=mysql -d -p 8080:8080
```
This way, environment variable gets local as value and passes to Dockerfile when we bring up a container.You can also pass on the Spring Profile as an environment variable at the run time as:
```
$ docker run -e "SPRING_PROFILES_ACTIVE=prod" -p 8080:8080 -t ibuchh/spring-petclinic