Browse Source

minimal docker config

master
art.dambrine 3 years ago
parent
commit
deb5b3d126
  1. 9
      docker-compose.yml
  2. 4
      dockerfile
  3. 14
      readme.md

9
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"

4
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"]

14
readme.md

@ -47,3 +47,17 @@ You will find the documentation in the **docs.html** at the root of this project
``` ```
java -jar dist/api-spring-gradle-b2boost-0.0.1-SNAPSHOT.jar java -jar dist/api-spring-gradle-b2boost-0.0.1-SNAPSHOT.jar
``` ```
### Config docker minimal
Build and run
```
docker-compose up -d --build
```
Simply run
```
docker-compose up -d
```
Display logs
```
docker-compose logs -f
```

Loading…
Cancel
Save