Skip to content

Commit 1f89e93

Browse files
committed
add documentation explaining how to deploy to CC
1 parent 74ae52b commit 1f89e93

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,36 @@ spring.jpa.hibernate.ddl-auto=update
4444

4545
# Running the Project in Production Mode
4646

47-
`mvn spring-boot:run -Pproduction`
47+
`mvn -Pproduction`
4848

4949
The default mode when the application is built or started is 'development'. The 'production' mode is turned on by enabling the `production` profile when building or starting the app.
5050

51+
52+
# Deploy the application for Production
53+
54+
`mvn package -Pproduction`
55+
56+
Then run it with
57+
58+
`java -jar target/*.jar`
59+
60+
61+
# Deploying the Project in Control Center
62+
63+
Bakery has a profile that allows the application being deployed with [Control Center](https://vaadin.com/docs/latest/control-center)
64+
65+
Compile, package, build the image and upload to docker hub.
66+
67+
```
68+
mvn package -P production -P control-center
69+
docker build -t your_docker_id/bakery:latest .
70+
docker push your_docker_id/bakery:latest
71+
```
72+
73+
Import it in Control Center selecting the `Identity manager` flag. Then create roles `admin`, `baker` and `barista` in Control Center and create the corresponding users to login into bakery application.
74+
75+
76+
5177
# Running in Eclipse or IntelliJ
5278
As both IDEs support running Spring Boot applications you just have to import the project and select `com.vaadin.starter.bakery.Application` as main class if not done automatically. Using an IDE will also allow you to speed up development even more. Just check https://vaadin.com/blog/developing-without-server-restarts.
5379

@@ -92,6 +118,6 @@ For full terms, see LICENSE
92118
Pro components used in the starter are :
93119
- [Vaadin Crud](https://vaadin.com/components/vaadin-crud)
94120
- [Vaadin Charts](https://vaadin.com/components/vaadin-charts)
95-
- [Vaadin Confirm Dialog](https://vaadin.com/components/vaadin-confirm-dialog)
121+
- [Vaadin Confirm Dialog](https://vaadin.com/components/vaadin-confirm-dialog)
96122

97123
Also the tests are created using [Testbench](https://vaadin.com/testbench) library.

0 commit comments

Comments
 (0)