FROM alpine/java:17

ARG VERSION=1.0.0

WORKDIR /app

RUN mkdir -p /app/server && mkdir -p /app/web

COPY leopard-server/target/leopard-server-${VERSION}.jar /app/server
COPY leopard-web/dist /app/web

EXPOSE 9786

ENTRYPOINT [ "java", "-jar", "/app/server/leopard-server-${VERSION}.jar", "--spring.profiles.active=image" ]
