This project contains multiple resources to explore and use SpringBoot + RediSearch + Redis JSON
Gitpod can spin up a fully featured developer friendly environment with both Visual Studio and Spring Redis Movies application running for you.
- Once the environment is available, the projects will compile, build containers and start with docker compose
- You can use the Gitpod Visual Studio
TERMINAL
window to use docker compose as instructed below. - Wait a minute or so and Gitpod will detect the ports from the application (80, with an Nginx reverse proxy in front of the SpringBoot application on port 8080) and RedisInsight (8001) for you to access over the Gitpod web routing. You can check in the Gitpod Visual Studio
PORTS
window. - Make sure to select the
Open Browser
to open those. - Note: as we are loading ~10000 movies, the application may show empty while this loads. Make sure to refresh or check with RedisInsight.
There is a docker compose script which will bootstrap all the components required to make this demo work.
- Run
docker compose up
from the root dir - The containers will start in the correct order
- You can also selectively build with
docker compose build backend
for example - On startup:
- The Java Service will bootstrap
Redis-Stack
with 9876 movies -
- if needed, update the docker-compose env to disable: MOVIE_INSERT_ON_STARTUP=false
movie-service | 2022-11-07 16:19:34.500 INFO 1 --- [main] io.redis.configuration.DataLoader : Loading sample data movies file from dir : './' with the provided path : ./movies.json
movie-service | 2022-11-07 16:19:35.445 INFO 1 --- [main] io.redis.configuration.DataLoader : Loading 9897 movies into Redis
movie-service | 2022-11-07 16:19:47.184 INFO 1 --- [main] io.redis.configuration.DataLoader : Finished loading data into Redis
NOTE: Startup Procedure Required:
- Start Redis-Stack
$ docker start redis-stack
- Start the Java Service
$ mvn spring-boot:run
- Start the frontend
$ yarn start
- ✨ Done
- Redis Stack : https://redis.io/docs/stack/
- Spring-Redis Java Movies Service ---> Java Service
- React Frontend Movies ---> React Movies Site
- Docker
- Java 11+
- NPM 8+
- Node v18.7.0
- Yarn 1.22.17+