Skip to content

Commit e5b4f54

Browse files
author
Michel Eckhardt
committed
add dockercompose
1 parent 2f76435 commit e5b4f54

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

backend.dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM openjdk:11-jre-slim
2+
VOLUME /tmp
3+
ARG JAR_FILE=target/*.jar
4+
COPY ${JAR_FILE} app.jar
5+
ENTRYPOINT ["java","-jar","/app.jar"]

docker-compose.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '3'
2+
services:
3+
frontend:
4+
build:
5+
dockerfile: ./frontend.dockerfile
6+
context: .
7+
image: spring-vue/frontend
8+
container_name: spring-vue-front
9+
ports:
10+
- "8080:8080"
11+
networks:
12+
- production-network
13+
14+
backend:
15+
build:
16+
dockerfile: ./backend.dockerfile
17+
context: .
18+
image: spring-vue/backend
19+
container_name: spring-vue-back
20+
networks:
21+
- production-network
22+
depends_on:
23+
- "frontend"
24+
networks:
25+
production-network:
26+
driver: bridge

frontend.dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM vuejs/ci:latest
2+
COPY ./frontend /opt
3+
WORKDIR /opt
4+
RUN npm install
5+
ENTRYPOINT npm run dev
6+
EXPOSE 8080

0 commit comments

Comments
 (0)