DEVOPS ASSESSMENT · TASK 01

Dockerize and run a Python Flask application

Dockerize and run a Python Flask application

using Docker Compose

using Docker Compose

We have a Python REST application that needs to be containerised and run using Docker Compose. Complete the task below within the given timeline.

We have a Python REST application that needs to be containerised and run using Docker Compose. Complete the task below within the given timeline.

Guidelines

How to approach this task
How to approach this task
  • Time-box it. Complete the task within the given timeline (as communicated by your interviewer), and mention explicitly how many hours you spent solving it.

  • Optimise for clarity. Your solution should be clean, readable, maintainable, and reflect solid DevOps methodology.

  • Your stack, your call. You're free to use whichever programming language, tools, or cloud platform you prefer, if needed.

  • Document as you go. Provide a description, execution steps, and testing steps in a markup file named EXECUTION-STEPS.md.

  • Stuck? Say so. If you're blocked on something, skip it and move forward document the issue and how you'd resolve it with more time.

  • Bonus points for solutions built with strong security practices.

  • Time-box it. Complete the task within the given timeline (as communicated by your interviewer), and mention explicitly how many hours you spent solving it.

  • Optimise for clarity. Your solution should be clean, readable, maintainable, and reflect solid DevOps methodology.

  • Your stack, your call. You're free to use whichever programming language, tools, or cloud platform you prefer, if needed.

  • Document as you go. Provide a description, execution steps, and testing steps in a markup file named EXECUTION-STEPS.md.

  • Stuck? Say so. If you're blocked on something, skip it and move forward document the issue and how you'd resolve it with more time.

  • Bonus points for solutions built with strong security practices.

  • Time-box it. Complete the task within the given timeline (as communicated by your interviewer), and mention explicitly how many hours you spent solving it.

  • Optimise for clarity. Your solution should be clean, readable, maintainable, and reflect solid DevOps methodology.

  • Your stack, your call. You're free to use whichever programming language, tools, or cloud platform you prefer, if needed.

  • Document as you go. Provide a description, execution steps, and testing steps in a markup file named EXECUTION-STEPS.md.

  • Stuck? Say so. If you're blocked on something, skip it and move forward, document the issue and how you'd resolve it with more time.

  • Bonus points for solutions built with strong security practices.

Requirements

Your Docker Compose setup should
Your Docker Compose setup should

Deploy 3 containers: the application, a database (PostgreSQL or MySQL), and a Redis cache.

Deploy 3 containers: the application, a database (PostgreSQL or MySQL), and a Redis cache.

Interconnect the database and Redis containers with the application container.

Interconnect the database and Redis containers with the application container.

Build a new Docker image for the application as part of the compose setup.

Build a new Docker image for the application as part of the compose setup.

Include a health check for the application container.

Include a health check for the application container.

Restart containers automatically unless they're stopped intentionally.

Restart containers automatically unless they're stopped intentionally.

Bring the entire stack up and running through Docker Compose.

Bring the entire stack up and running through Docker Compose.

Note

we're not looking for completion or perfection. We expect trade-offs to happen, and how you reason about them matters more than a finished checklist.

Getting started

How to approach this task
How to approach this task

Download the application files below to begin. The download includes the Flask app's source code along with its own README.md, which covers local setup for the app itself. Read that first, then containerise around it.

Download the application files below to begin. The download includes the Flask app's source code along with its own README.md, which covers local setup for the app itself. Read that first, then containerise around it.

What happens next

Evaluation & deliverables
Evaluation & deliverables

These are the six areas we read your submission against. They are not a checklist to exhaust a thoughtful partial solution scores better than a complete one you can't explain.

  • Compose orchestration. Three services wired together correctly, with dependency ordering, restart behaviour, and a health check that reflects genuine readiness rather than merely a running process.

  • It actually runs. The stack comes up from a clean clone with a single command, and every endpoint listed in the application's README.md responds as documented.

  • Configuration. Settings are supplied through the environment rather than baked into the image, with the application, database, and cache each reachable from the others.

  • Security. No secrets in the repository or the image history, a least-privilege container runtime, and no service published more widely than it needs to be.

  • Documentation and reasoning. An EXECUTION-STEPS.md someone else could follow unaided, and a clear account of the trade-offs you made, what you left out, and how you'd close the gaps with more time. We weigh this as heavily as the code.

These are the six areas we read your submission against. They are not a checklist to exhaust a thoughtful partial solution scores better than a complete one you can't explain.

  • Compose orchestration. Three services wired together correctly, with dependency ordering, restart behaviour, and a health check that reflects genuine readiness rather than merely a running process.

  • It actually runs. The stack comes up from a clean clone with a single command, and every endpoint listed in the application's README.md responds as documented.

  • Configuration. Settings are supplied through the environment rather than baked into the image, with the application, database, and cache each reachable from the others.

  • Security. No secrets in the repository or the image history, a least-privilege container runtime, and no service published more widely than it needs to be.

  • Documentation and reasoning. An EXECUTION-STEPS.md someone else could follow unaided, and a clear account of the trade-offs you made, what you left out, and how you'd close the gaps with more time. We weigh this as heavily as the code.

Deliverables

Code - Dockerfile, Compose file, and the application source

Documentation - EXECUTION _ STEPS.md

A live demo in your next interview call

How to submit

Sending us your solution
Sending us your solution
  • Push to a public GitHub repository. Commit your Dockerfile, Compose file, EXECUTION-STEPS.md and the application source, then reply to your interviewer with the repository URL.

  • Commit as you work. We read the history; a series of meaningful commits tells us more about how you work than a single squashed drop.

  • Never commit real secrets. Use placeholder credentials, a .env file that is git-ignored, or Compose secrets. The repository is public.

  • Deadline. Submit within the timeline your interviewer communicated to you. If anything is unclear, ask them before the deadline rather than after.

  • Push to a public GitHub repository. Commit your Dockerfile, Compose file, EXECUTION-STEPS.md and the application source, then reply to your interviewer with the repository URL.

  • Commit as you work. We read the history; a series of meaningful commits tells us more about how you work than a single squashed drop.

  • Never commit real secrets. Use placeholder credentials, a .env file that is git-ignored, or Compose secrets. The repository is public.

  • Deadline. Submit within the timeline your interviewer communicated to you. If anything is unclear, ask them before the deadline rather than after.

  • Push to a public GitHub repository. Commit your Dockerfile, Compose file, EXECUTION-STEPS.md and the application source, then reply to your interviewer with the repository URL.

  • Commit as you work. We read the history; a series of meaningful commits tells us more about how you work than a single squashed drop.

  • Never commit real secrets. Use placeholder credentials, a .env file that is git-ignored, or Compose secrets. The repository is public.

  • Deadline. Submit within the timeline your interviewer communicated to you. If anything is unclear, ask them before the deadline rather than after.

Ready to start?

Download the application files and follow the README.