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?
Simply define the directory:
server.servlet.session.store-dir=/<the directory you mount as volume>
That's it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With