-
Notifications
You must be signed in to change notification settings - Fork 3
Docker Backend
vanpeerdevelopment edited this page Jan 14, 2016
·
2 revisions
# Dockerfile
FROM java:8u66-jdk
ENV db.host dws_db_1:5432
COPY dws-jar/dws-rest.jar /usr/src/dws-rest.jar
WORKDIR /usr/src/
EXPOSE 8080
ENTRYPOINT ["java", "-jar" , "dws-rest.jar"]The DWS backend is a Spring Boot application which provides REST services to retrieve pets and set up dates. The Maven build generates a fat jar containing DWS and all its dependencies. Executing the jar, using java 8, will start the embedded tomcat which is listening for requests on port 8080.
The DWS backend images is based on a standard java 8 Docker image. Next it is possible to override the properties defined in the property file of the application using environment variables. This is especially useful to configure the database host. The fat jar is copied into the image and the port its listening on is exposed. At last an entrypoint is defined which will start the application when the Docker container is started.
- Context Diagram
- Container Diagram
- Component Diagram
- Docker
- Maven and Gulp
- Jenkins