Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit acf398e

Browse files
committed
Simplifies docker build, updates pom files to work with new build
1 parent f321403 commit acf398e

File tree

12 files changed

+13722
-119
lines changed

12 files changed

+13722
-119
lines changed

.dockerignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.git/
2+
.github/
13

24
# IDE-specific files and folders
35
.classpath
@@ -12,6 +14,7 @@ nb-configuration.xml
1214
# temp build files
1315
data
1416
target
17+
*/**/target
1518
test-output
1619
/test.json
1720
logs/
@@ -27,9 +30,9 @@ dependency-reduced-pom.xml
2730
# node stuff
2831
npm-debug.log*
2932
.grunt
30-
node_modules
33+
*/**/node_modules
3134
.npm
32-
bower_components/
35+
*/**/bower_components/
3336
dist/
3437
node/
3538

Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Build
2+
FROM maven:3.6.3-jdk-11 as builder
3+
4+
RUN mkdir -p $HOME/.m2
5+
6+
ADD . /home/cakeshop
7+
8+
RUN cd /home/cakeshop && mvn clean -DskipTests package
9+
10+
# Create docker image with only distribution jar
11+
FROM adoptopenjdk/openjdk11:alpine
12+
13+
RUN apk add nodejs
14+
15+
# Cakeshop data directory is a volume, so it can be persisted and
16+
# survive image upgrades
17+
VOLUME /cakeshop/data
18+
19+
WORKDIR /cakeshop
20+
21+
COPY --from=builder /home/cakeshop/cakeshop-api/target/cakeshop*.war /cakeshop/cakeshop.war
22+
23+
# for main web interface
24+
EXPOSE 8080
25+
26+
ENTRYPOINT ["java", "-jar", "/cakeshop/cakeshop.war"]

cakeshop-api/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
<plugin>
393393
<groupId>com.github.eirslett</groupId>
394394
<artifactId>frontend-maven-plugin</artifactId>
395-
<version>1.2</version>
395+
<version>1.11.0</version>
396396

397397
<configuration>
398398
<workingDirectory>src/main/webapp</workingDirectory>
@@ -536,7 +536,7 @@
536536
<pluginExecutionFilter>
537537
<groupId>com.github.eirslett</groupId>
538538
<artifactId>frontend-maven-plugin</artifactId>
539-
<versionRange>[1.2,)</versionRange>
539+
<versionRange>[1.11.0,)</versionRange>
540540
<goals>
541541
<!-- use 'webpack watch' for incremental building -->
542542
<goal>install-node-and-npm</goal>

0 commit comments

Comments
 (0)