updated docker

This commit is contained in:
alex 2024-08-05 17:04:18 -04:00
parent 09c7b2b626
commit 1164d69b95
3 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,9 @@
FROM openjdk:21-jdk-slim
FROM openjdk:21-jdk-buster as build
RUN apt-get install -y git
RUN git clone https://git.primefactorsolutions.com/PFS/pfs-recruiting.git
RUN cd pfs-recruiting && ./mvnw clean package -Pproduction
COPY target/*.jar app.jar
FROM build
COPY --from=0 pfs-recruiting/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app.jar"]

9
compose.yaml Normal file
View File

@ -0,0 +1,9 @@
services:
web:
build: .
ports:
- "8080:8080"
volumes:
- myapp:/var/opt/pfs
volumes:
myapp:

View File

@ -9,7 +9,8 @@ vaadin.launch-browser=true
vaadin.allowed-packages = com.vaadin,org.vaadin,com.primefactorsolutions,com.hilerio.ace,com.flowingcode.vaadin
spring.datasource.url=jdbc:h2:mem:testdb
# spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.url=jdbc:h2:file:/var/opt/pfs
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=sa