File tree Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Original file line number Diff line number Diff line change 11# Microservice Template with Docker
22
3- This is a small project where the following is combined in order to create a usable microservice:
3+ This is a small project where the following is combined in order to create a usable microservice template:
4+
5+ Right now, I wanted to keep it really simple so, the * magic service* only generates a random string with the size
6+ the user defines. The user should include the Api Key and have more or equal available units than the size of the
7+ random string.
48
59- [ RestAPI (Python + Flask)] ( https://github.com/pallets/flask )
610- [ Postgres Database] ( https://www.postgresql.org/ )
711- [ Nginx] ( https://www.nginx.com/ )
812- [ Postgres db explorer] ( http://sosedoff.github.io/pgweb/ ) (This can be removed, it is only used for testing)
913
14+ <img src =" art/dockerized_microservice_test.gif " width =" 480 " height =" 480 " >
15+
1016## Test it
1117
1218- Clone and start it:
1319
14- ``` sh
15- git clone https://github.com/gaborvecsei/Dockerized-Microservice-Template.git
20+ ``` sh
21+ sudo ./start.sh
22+ ```
23+
24+ - You can reach the index page at ` localhost:8080` . To use another port, just modify the ` conf.d/app.conf` Nginx
25+ configuration file.
26+ - With ` localhost:8080/microservice/add_test_users/5` you can create test Users and ApiKeys which you can use
27+ - At ` localhost:8080/microservice/sample_service` you can reach the sample RestApi endpoint
1628
17- sudo ./start.sh
18- ```
29+ # # Stop & Logs
1930
2031- Stop it:
2132
22- ``` sh
23- sudo docker-compose down
24- ```
33+ ` ` ` sh
34+ sudo docker-compose down
35+ ` ` `
2536
2637- See the container logs:
2738
28- ``` sh
29- sudo docker-compose logs -f
30- ```
39+ ` ` ` sh
40+ sudo docker-compose logs -f
41+ ` ` `
3142
32- ## TODO
43+ # # Todo
3344
45+ - [X] HTML Page
3446- [ ] Log In
3547- [ ] User Page
3648- [ ] Registration
You can’t perform that action at this time.
0 commit comments