Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backend.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:11-jre-slim
VOLUME /tmp
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'
services:
frontend:
build:
dockerfile: ./frontend.dockerfile
context: .
image: spring-vue/frontend
container_name: spring-vue-front
ports:
- "8080:8080"
networks:
- production-network

backend:
build:
dockerfile: ./backend.dockerfile
context: .
image: spring-vue/backend
container_name: spring-vue-back
networks:
- production-network
depends_on:
- "frontend"
networks:
production-network:
driver: bridge
6 changes: 6 additions & 0 deletions frontend.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM vuejs/ci:latest
COPY ./frontend /opt
WORKDIR /opt
RUN npm install
ENTRYPOINT npm run dev
EXPOSE 8080