Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jreijn/spring-session-docker-demo
This project uses Spring Boot, Spring Session, Redis, HAProxy and Docker to run HA environment with Docker Compose
https://github.com/jreijn/spring-session-docker-demo
docker haproxy spring-boot spring-session
Last synced: about 1 month ago
JSON representation
This project uses Spring Boot, Spring Session, Redis, HAProxy and Docker to run HA environment with Docker Compose
- Host: GitHub
- URL: https://github.com/jreijn/spring-session-docker-demo
- Owner: jreijn
- Created: 2015-07-19T22:08:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-14T20:40:49.000Z (about 9 years ago)
- Last Synced: 2023-03-11T18:33:33.376Z (over 1 year ago)
- Topics: docker, haproxy, spring-boot, spring-session
- Language: Java
- Homepage: http://www.jeroenreijn.com/2015/09/testing-session-replication-with-docker-compose-redis-spring-session.html
- Size: 145 KB
- Stars: 27
- Watchers: 2
- Forks: 28
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Session Demo with Docker and Docker Compose
This is a demo project, which uses Spring Boot, Spring Session, Redis, HAProxy and Docker to demonstrate the use of Spring Session within a scalable environment.
## Prerequisets
```
$ docker-machine create --driver virtualbox dev
```To be able to let docker talk to the machine we've just created we need to export some environment variables. You can do this by using:
```
$ eval "$(docker-machine env dev)"
```## How to run
Go into the 'app' directory and let's first build the application.
```
$ mvn package
```Go back into the root of the project.
Build the container images
```
$ docker-compose build
```Start docker-compose and watch the containers start
```
$ docker-compose run
```## Playing around with the App
To figure out on which host you can see the application you can run:
```
$ docker-machine ip dev
```Now we know the ip address on which the container host is running. This is important because HAProxy is exposed on port 80 of the host.
Now you can connect to http://[DOCKER_HOST]/ and you should see the app.