Skip to content

Commit c0f9faa

Browse files
committed
add documentation explaining how to deploy to CC
1 parent be098bb commit c0f9faa

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,34 @@ 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+
`mvn package -P production -P control-center`
68+
`docker build -t your_docker_id/bakery:latest .`
69+
`docker push your_docker_id/bakery:latest`
70+
71+
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.
72+
73+
74+
5175
# Running in Eclipse or IntelliJ
5276
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.
5377

@@ -92,6 +116,6 @@ For full terms, see LICENSE
92116
Pro components used in the starter are :
93117
- [Vaadin Crud](https://vaadin.com/components/vaadin-crud)
94118
- [Vaadin Charts](https://vaadin.com/components/vaadin-charts)
95-
- [Vaadin Confirm Dialog](https://vaadin.com/components/vaadin-confirm-dialog)
119+
- [Vaadin Confirm Dialog](https://vaadin.com/components/vaadin-confirm-dialog)
96120

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

0 commit comments

Comments
 (0)