Example of multi-stage dockerization and integration of a Java Spring application with docker-compose.
Docker
docker build . -t app
docker-compose up -d
Operation | URL | Parameters | Returned value |
---|---|---|---|
GET | localhost:8080 | None | Display all messages |
POST | localhost:8080/add | name: string message: string | A new message is added |
PUT | localhost:8080/{id} | None | Modifies the message with id == {id}; if it does not exist, a new message is created, similar to /add |
DELETE | localhost:8080/delete/{id} | None | Delete message with id == {id} |