diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b2c2261 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '2' +services: + # Container myapp + web: + image: arthur/api-rest-b2boost + build: . + ports: + - "8080:8080" + restart: "unless-stopped" diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..68249c9 --- /dev/null +++ b/dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:11-jre-slim +ARG JAR_FILE=dist/*.jar +COPY ${JAR_FILE} app.jar +ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file diff --git a/readme.md b/readme.md index 3869bde..f16321a 100644 --- a/readme.md +++ b/readme.md @@ -46,4 +46,18 @@ You will find the documentation in the **docs.html** at the root of this project ### Run the dist jar ``` java -jar dist/api-spring-gradle-b2boost-0.0.1-SNAPSHOT.jar -``` \ No newline at end of file +``` + +### Config docker minimal +Build and run +``` +docker-compose up -d --build +``` +Simply run +``` +docker-compose up -d +``` +Display logs +``` +docker-compose logs -f +```