YSLG - Time Expense Backend
There are two docker files that can be used to build the server as docker image.
- Dockerfile - the docker file that runs the server from a jar
- Dockerfile-Graal - the docker file that compiles the server to a native image
Building the normal docker file
docker build -f .\docker\Dockerfile -t te-norm .
or Graal VM
docker build -f .\docker\Dockerfile-Graal -t te-graal .
Running the Docker File
docker run --network host te-norm
or Graal VM
docker run --network host te-graal
Remember to add a profile when executing it locally:
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=local","/app.jar"]
Graal VM Docker file
RUN native-image -jar app.jar -Dspring.profiles.active=local time-expense-server
e.g. GET http://localhost:8080/api/v1/report/csv?sql="SELECT * from yourtable"