docker-composefile. Additionally, we will use Postgres as a database and Redis as a message broker, to offload some of the computational load to the
workerservice. Our services will be:
index.htmlfile it bundles and serves statically via a GET request to
vote/app.pyfile, you should see the code below:
index.htmltemplate file, with a few parameters.
OPTION_Baren’t set, the default options will be "Cats" and "Dogs".
votesfor new items.
updateVote, which handles writing the result of a vote to the PostgreSQL database.
index.htmlfile via its
getVotes()function using the database client.
result/views/app.js) reads from the
scoreschannel, and updates the result application’s frontend accordingly.
dockerfilein their respective directories. We can use
docker-composeto coordinate and run our applications together, as well as run containerized versions of Redis and PostgreSQL.
docker-compose.ymlfile required to build and run our applications.
localhost, and the Result application will be available via port
docker-compose.yamlfile, we’re ready to deploy our app to ReleaseHub.
example-voting-apprepository from the dropdown list.
docker-compose.ymlfile, ReleaseHub will automatically detect the services and their configuration.
OPTION_Brespectively, and then click Save As New Version.
developmentbranch of the project, so that you can iterate on your project without impacting a production deployment.