natearn / 12-factor-docker-example Goto Github PK
View Code? Open in Web Editor NEWBuilding a multi-service application backwards from the 12 factor app guidelines.
Building a multi-service application backwards from the 12 factor app guidelines.
Each services should be secured, demanding some form of authorization in order to interact with it. In order to obtain that authorization at runtime, in a secure way, services will use hashicorp Vault. The service should exchange an authentication credential (which will be provided through the config) with the secrets
service for an authorization credential for a specific service.
The scope and nature of the granted authorization are to be determined. At this time, I am not certain of the expectations or limitations of vault. This secrets solution should be easily replaced, in case the deployment environment offers an integrated solution, but the general authorization pattern should still be followed:
TODO:
secrets
.api
and database
services to connect using the credentials provided by the secrets
service.api
service to authenticate with the secrets
service to facilitate the database connection.This a follow-up to issue #2.
In order for this example app to exercise this architecture, it needs to use the database service. I think the easiest possible way to do this is to put categories into a table.
It's probably best to do this after setting up the secrets service.
I predict this involves:
A cypress test is part of a collection which must be provided to the cypress service upon container startup. Using a host-mount sounds tempting here, but I doubt it will work for other environments; try to find something that works across the board.
Please update the README with instructions on how to repeat this process, especially if any part of it is domain-specific or unintuitive.
Following my own advice, and the advice of the 12 factor guideline. All image versions should be static, such that the containers do not change unintentionally between deployments.
It might be enough to lookup the latest versions of the images on docker hub, and use that.
The primary role of these Dockerfiles is to build images for production. Ideally, these images can also be used as-is for development, but I don't expect that to necessarily be satisfiable.
Improvements:
Considerations:
In a real-world situation, these would be the stars of the show. But right now they are more of an inconvenience. They don't have to be pretty, they don't have to be useful, but they do need to exercise the architecture to illustrate how this all works together.
I predict this will require the assignee to:
mocks
service. Ensure that it can be repeated on other environments (don't use a host-binding).The Goal here is to generate a working example of a record/replay service imposter. It's important that we can capture real interactions and reuse them to enable offline end-to-end tests. A test environment should not access external resources, and in some environments, may not be able to. Recordings must then be generated in a separate "privileged" execution mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.