Skip to content

A Vue based Frontend that prints data from a Flask Backend, backend isolated inside the app that is deployed by Docker Compose.

License

Notifications You must be signed in to change notification settings

rou-cru/Microservice-HelloWorld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservice "Hello World" Template

Components:

  • WebApp --> Vue
    • Nginx <-- Inverse Proxy
  • Backend --> Flask

WebApp

Just prints the hostname of the backend. On this way, we know that the arquitechture works as expected. The interface can be accessed through localhost in an Internet Browser without errors related with CORS or Hostnames unresolved. Implemented with Vue as template to future development of a specific application.

Backend

API implemented with Flask for simplicity, ist not exposed so just the Vue app can use the API.

Microservices

We have 2 containers that create 1 microservice based webapp.

The data flow is straightforward Browser --> Vue --> Flask Browser <-- Vue <-- Flask

The user can access the backend directly Browser --X--> Flask

Because we require fetch the isolated API in the User browser, the Vue container adds a Nginx reverse proxy to resolve the backend IP as part of the same container. Both containers are multistage to reduce the size in the final Images and are build throught a compose file.

How run it?

docker compose up --build

After complete the build process, go to http://localhost/ in a Web Browser, you should see something similar to "Name:2fdd6fde14cd" in the middle of the website.

About

A Vue based Frontend that prints data from a Flask Backend, backend isolated inside the app that is deployed by Docker Compose.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published