merge tutor updates #82
13
app/Dockerfile
Normal file
13
app/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Dockerfile/Docker-Compose file based on an initial version authored by Alexander Lontke (ASSE, Fall Semester 2021)
|
||||||
|
|
||||||
|
FROM maven as build
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN mvn -f app/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
|
||||||
|
FROM openjdk
|
||||||
|
|
||||||
|
COPY --from=build /app/target/app-0.1.0.jar ./app-0.1.0.jar
|
||||||
|
|
||||||
|
CMD java -jar app-0.1.0.jar
|
60
docker-compose-local.yml
Normal file
60
docker-compose-local.yml
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# Dockerfile/Docker-Compose file based on an initial version authored by Alexander Lontke (ASSE, Fall Semester 2021)
|
||||||
|
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: ./app
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
# Use environment variables instead of application.properties
|
||||||
|
environment:
|
||||||
|
- KEY=VALUE
|
||||||
|
ports: #Just needed when testing from outside the docker network
|
||||||
|
- "8080:8080"
|
||||||
|
networks:
|
||||||
|
- tapas-network
|
||||||
|
|
||||||
|
tapas-tasks:
|
||||||
|
build:
|
||||||
|
context: ./tapas-tasks
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
# Use environment variables instead of application.properties
|
||||||
|
environment:
|
||||||
|
- KEY=VALUE
|
||||||
|
ports: #Just needed when testing from outside
|
||||||
|
- "8081:8081"
|
||||||
|
networks:
|
||||||
|
- tapas-network
|
||||||
|
|
||||||
|
tapas-auction-house:
|
||||||
|
build:
|
||||||
|
context: ./tapas-auction-house
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
# Use environment variables instead of application.properties
|
||||||
|
environment:
|
||||||
|
- KEY=VALUE
|
||||||
|
ports: #Just needed when testing from outside
|
||||||
|
- "8082:8082"
|
||||||
|
networks:
|
||||||
|
- tapas-network
|
||||||
|
|
||||||
|
mongodb:
|
||||||
|
image: mongo
|
||||||
|
container_name: mongodb
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: 8nP7s0a # Can not be changed again later on
|
||||||
|
volumes:
|
||||||
|
- database:/data/db
|
||||||
|
networks:
|
||||||
|
- tapas-network
|
||||||
|
|
||||||
|
#Volume for mongodb. One per server.
|
||||||
|
volumes:
|
||||||
|
database:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
tapas-network:
|
||||||
|
driver: bridge
|
13
tapas-auction-house/Dockerfile
Normal file
13
tapas-auction-house/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Dockerfile/Docker-Compose file based on an initial version authored by Alexander Lontke (ASSE, Fall Semester 2021)
|
||||||
|
|
||||||
|
FROM maven as build
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN mvn -f app/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
|
||||||
|
FROM openjdk
|
||||||
|
|
||||||
|
COPY --from=build /app/target/tapas-auction-house-0.0.1-SNAPSHOT.jar ./tapas-auction-house-0.0.1-SNAPSHOT.jar
|
||||||
|
|
||||||
|
CMD java -jar tapas-auction-house-0.0.1-SNAPSHOT.jar
|
13
tapas-tasks/Dockerfile
Normal file
13
tapas-tasks/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Dockerfile/Docker-Compose file based on an initial version authored by Alexander Lontke (ASSE, Fall Semester 2021)
|
||||||
|
|
||||||
|
FROM maven as build
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN mvn -f app/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
|
||||||
|
FROM openjdk
|
||||||
|
|
||||||
|
COPY --from=build /app/target/tapas-tasks-0.0.1-SNAPSHOT.jar ./tapas-tasks-0.0.1-SNAPSHOT.jar
|
||||||
|
|
||||||
|
CMD java -jar tapas-tasks-0.0.1-SNAPSHOT.jar
|
Loading…
Reference in New Issue
Block a user