Reputation: 2841
I have a standart Dockerfile
for my spring boot(2.2) app
FROM openjdk:11-slim
EXPOSE 8080
COPY ./build/libs/*.jar ./app.jar
CMD java -jar app.jar
There is an property in spring boot to enable session persistence (in my case on Tomcat
)
server.servlet.session.persistent=true
Using redis seems like an overkill for my one-service application.
Maybe I can create a volume to store sessions?
Upvotes: 4
Views: 1313
Reputation: 36143
Simply define the directory:
server.servlet.session.store-dir=/<the directory you mount as volume>
That's it.
Upvotes: 9