FROM adoptopenjdk/openjdk11:x86_64-ubuntu-jre-11.0.13_8
ARG JAR_FILE=target/ShopWarehouse-0.0.1-SNAPSHOT.jar
WORKDIR /opt/app
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]
version: "3.9"
services:
app:
build:
context: .
dockerfile: dockerfile
postgres:
image: "postgres:13.3-alpine"
environment:
- DB_DRIVER=org.postgresql.Driver
- DB_URL=jdbc:postgresql://postgres:5432/shop_warehouse
- POSTGRES_DB=shop_warehouse
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=12332112
ports:
- "5432:5432"