Amaranth
Amaranth

Reputation: 2491

Simple REST web server in docker container

I would like a small web server that offers a REST api, that external tools can call to store very small amount of data (either write or read data) and offer a html page to display that data.

The data would be a simple matrix (2d table). I was planning on having external tools sending a single entry of the data with the REST api (one square of the table) in json format (it will contain only about three strings). Maybe store the data in a xml file.

I would like that web server to be in a docker container, so it can be deployed easily in our cloud environment (using a volume so in does not lose data). It would run under a Linux environment.

I know this is kind of a broad question, but I would like to know what technology to use for that case. Should I use Python? I don't actually know how to do that. I did docker containers in the past for other things, did some REST api in JAVA, but nothing like this.

Do you have suggestions or resources?

Upvotes: 6

Views: 6677

Answers (1)

Saril Sudhakaran
Saril Sudhakaran

Reputation: 1129

you can use Python Flask to easily create a REST service and containerize . A tutorial available here Also you can try out spring-boot using which you can package a web container like tomcat along with which will be similar to your requirement . example

Upvotes: 1

Related Questions