This is a simple Spring Boot web application exposing endpoints which can be called by the floaty frontend.
- Start the spring boot app (or build the docker image and run the container)
- Run
curl localhost:8080
or 'curl localhost:8080/users' for local testing
docker build -t matthaeusheer/floaty-backend:latest .
docker run -p 8080:8080 matthaeusheer/floaty-backend:latest
curl loaclhost:8080/users
This will enable the possibility to directly run a MySQL database alongside the backend locally.
Build the necessary images using
docker-compose build
Run the services using
docker-compose up
Simply run the floaty Application in your IDE
Run the services clicking arrows in docker-compose.yml file.
How to connect to MySQL database which runs in the db container from within IDEA?
- Note that 3306 is exposed s.t. it is accessible on localhost
- Go to Database tab on upper right
- Add connection
- Settings -> Host: localhost, Port: 3306 (default), User & Password as configured, Database: floaty-db