docker-compose
file. Additionally, we will use Postgres as a database and Redis as a message broker, to offload some of the computational load to the worker
service. Our services will be:index.html
file it bundles and serves statically via a GET request to /
.vote/app.py
file, you should see the code below:votes
.index.html
template file, with a few parameters.option_a
and option_b
.OPTION_A
and OPTION_B
aren’t set, the default options will be "Cats" and "Dogs".votes
for new items.updateVote
, which handles writing the result of a vote to the PostgreSQL database.index.html
file via its /
route.getVotes()
function using the database client.scores
.result/views/app.js
) reads from the scores
channel, and updates the result application’s frontend accordingly.dockerfile
in their respective directories. We can use docker-compose
to coordinate and run our applications together, as well as run containerized versions of Redis and PostgreSQL.docker-compose.yml
file required to build and run our applications.5001
on localhost
, and the Result application will be available via port 5002
.docker-compose.yaml
file, we’re ready to deploy our app to ReleaseHub.example-voting-app
repository from the dropdown list.docker-compose.yml
file, ReleaseHub will automatically detect the services and their configuration.OPTION_A
and OPTION_B
were set to “Cats” and “Dogs”, but perhaps we’d like our users to choose between “Python” and “JavaScript”.OPTION_A
and OPTION_B
respectively, and then click Save As New Version.development
branch of the project, so that you can iterate on your project without impacting a production deployment.