File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Run MyStamps in Docker
2
+
3
+ MyStamps application can be run as a Docker container. While there are many
4
+ possible configurations, we support only those that are typically used:
5
+
6
+ * ** a single container** where the application is running with ` test ` profile.
7
+ In this mode, it also runs in-memory database H2. This is roughly the same as
8
+ executing ` mvn spring-boot:run ` command but inside a Docker container.
9
+
10
+ * Build a WAR file that will be used in container building:
11
+ ``` console
12
+ $ mvn package
13
+ $ cd docker
14
+ $ ln -v ../target/mystamps.war mystamps.war
15
+ ```
16
+ By the way, don't forget to remove this hard link after using.
17
+ * Build an image and run a container with `docker-compose`:
18
+ ```console
19
+ $ docker-compose up -d
20
+ ```
21
+ * The same but with a plain Docker:
22
+ ```console
23
+ $ docker build -t mystamps:latest .
24
+ $ docker run -d -p 8080:8080 mystamps:latest
25
+ ```
26
+
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+
3
+ services :
4
+ web :
5
+ build : ./
6
+ ports : [ "8080:8080" ]
You can’t perform that action at this time.
0 commit comments