Skip to Content
Mastering Flask Web Development - Second Edition
book

Mastering Flask Web Development - Second Edition

by Daniel Gaspar, Jack Stouffer
October 2018
Intermediate to advanced
332 pages
8h 9m
English
Packt Publishing
Content preview from Mastering Flask Web Development - Second Edition

Docker Compose

Docker Compose is a tool for defining our multi-layer application. This is where we define all the services needed to run our application, configure them, and link them together.

Docker Compose is based on YAML files, which is where all the definition happens, so let's dive right into it and take a look at the deploy/docker/docker-compose.yaml file:

version: '3'services:  db:    image: mysql:5.7    env_file:      - prod.env  rmq:    image: rabbitmq:3-management    env_file:      - prod.env    ports:      - 15672:15672  redis:      image: redis  worker:    image: myblog_worker:latest    depends_on:      - db      - rmq    env_file:      - prod.env  frontend:    image: myblog    depends_on:      - db      - rmq    env_file:      - prod.env    restart: always    ports:      - 80:80

In Docker Compose, we have defined the following ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flask Web Development, 2nd Edition

Flask Web Development, 2nd Edition

Miguel Grinberg
Flask Web Development

Flask Web Development

Miguel Grinberg

Publisher Resources

ISBN: 9781788995405Supplemental Content