Skip to content
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addressbook.iml

target
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Build stage
FROM maven:latest AS build

# Set the working directory inside the container
WORKDIR /app

# Copy the source code directory to the container
COPY src /app/src
# Copy the pom.xml file to the container
COPY pom.xml /app

# Run the Maven build to compile and package the application
RUN mvn clean install

# Final stage
FROM tomcat:9.0-alpine

# Copy the built WAR file from the build stage to the Tomcat webapps directory
COPY --from=build /app/target/addressbook-2.0.war /usr/local/tomcat/webapps/

# Expose the default Tomcat port for
EXPOSE 8080

# Start Tomcat and run the deployed application
CMD ["catalina.sh", "run"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Addressbook Tutorial
====================
Addressbook Tutorial
=======================

This tutorial teaches you some of the basic concepts in [Vaadin Framework](https://vaadin.com). It is meant to be
a fast read for learning how to get started - not an example on how application should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
public class ContactService {

// Create dummy data by randomly combining first and last names
static String[] fnames = { "Peter", "Alice", "John", "Mike", "Olivia",
static String[] fnames = { "Jerry", "Alice", "John", "Mike", "Olivia",
"Nina", "Alex", "Rita", "Dan", "Umberto", "Henrik", "Rene", "Lisa",
"Linda", "Timothy", "Daniel", "Brian", "George", "Scott",
"Jennifer" };
static String[] lnames = { "Smith", "Johnson", "Williams", "Jones",
static String[] lnames = { "Smith", "Johnson", "Sai", "Jones",
"Brown", "Davis", "Miller", "Wilson", "Moore", "Taylor",
"Anderson", "Thomas", "Jackson", "White", "Harris", "Martin",
"Thompson", "Young", "King", "Robinson" };
Expand Down