Provides a convenient way to connect frontend/backend services together:
- nginx: generic HTTP proxy server
- python-flask micro-web framework (gunicorn WSGI HTTP server)
- memcached: memory object caching system
- postgre: relational database system
+---------+ +--------+
|memcached| |postgres| Services
+-+-------+ +-----+--+
^ ^ ^
+-+-----+ | +----+--+
| api | +----+ web | Applications
+---+---+ +---+---+
^ ^
+---+--------------+---+
| nginx | Server
+----------------------+
# start everything
docker-compose up [--build]
# [OPTIONAL]
# start individual services (with dependencies)
docker-compose up api
# Build and run containers in the foreground
make docker-deps-up-nodaemon
First, browse to Here, and view the response:
Hello world! - 1
This queried postgres for index #1, and set the value in memcached (accessible across both the web and api containers) for 30 seconds.
To view the value, check the response Here:
Hello world! - [(1, 'Bitwolf', 'morbi vel lectus')]
Browsing to different indexes, e.g. ID 2 will set different information into memcached.