Skip to content
Snippets Groups Projects
Commit 48da44aa authored by Mirco Nasuti's avatar Mirco Nasuti
Browse files

Run the backend in Docker

parent ad9e30bb
No related branches found
No related tags found
No related merge requests found
FROM java:8-jre
COPY target/mip.jar /opt/mip/mip.jar
EXPOSE 8080
CMD ["/usr/bin/java", "-jar", "/opt/mip/mip.jar"]
#!/bin/bash -e
if groups $USER | grep &>/dev/null '\bdocker\b'; then
CAPTAIN="captain"
else
CAPTAIN="sudo captain"
fi
$CAPTAIN build
portal-backend:
build: Dockerfile
image: portal-backend
pre:
- echo "Build portal-backend"
- mvn package
post:
- echo "Finished building portal-backend"
......@@ -102,6 +102,7 @@
</dependencies>
<build>
<finalName>mip</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......
run.sh 0 → 100755
#!/bin/bash -e
if groups $USER | grep &>/dev/null '\bdocker\b'; then
DOCKER="docker"
else
DOCKER="sudo docker"
fi
$DOCKER run -p 8080:8080 -d portal-backend
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment