# Follow guide at https://realpython.com/blog/python/dockerizing-flask-with-compose-and-machine-from-localhost-to-the-cloud/

version: '3'

services:
  web:
    build: .
    ports:
      - 5000:5000
    command: gunicorn -b 0.0.0.0:5000 ocspdash.web.wsgi:app --log-level=DEBUG
    depends_on:
     - db
    environment:
      OCSPDASH_CONNECTION: postgresql://postgres:postgres@db:5432/postgres
      OCSPDASH_SECRET_KEY: ${SECRET_KEY}
      CENSYS_API_ID: ${CENSYS_API_ID}
      CENSYS_API_SECRET: ${CENSYS_API_SECRET}

  db:
    image: postgres:latest
    volumes:
      - db_data:/var/lib/postgres

#  db:
#    image: mysql:5.7
#    volumes:
#       - db_data:/var/lib/mysql
#    environment:
#      MYSQL_USER: ocspd
#      MYSQL_PASSWORD: ocspd
#      MYSQL_DATABASE: ocsp
#      MYSQL_ROOT_PASSWORD: root
#    ports:
#        - 3306:3306
#    command: mysqld \
#      --character-set-server=utf8 \
#      --collation-server=utf8_unicode_ci \
#      --init-connect='SET NAMES UTF8;' \
#      --innodb-flush-log-at-trx-commit=0

volumes:
  db_data:

# Follow guide at https://realpython.com/blog/python/dockerizing-flask-with-compose-and-machine-from-localhost-to-the-cloud/

version: '3'

services:
  web:
    build: .
    ports:
      - 5000:5000
    command: gunicorn -b 0.0.0.0:5000 ocspdash.web.wsgi:app --log-level=DEBUG
    depends_on:
     - db
    environment:
      OCSPDASH_CONNECTION: postgresql://postgres:postgres@db:5432/postgres
      OCSPDASH_SECRET_KEY: ${SECRET_KEY}
      CENSYS_API_ID: ${CENSYS_API_ID}
      CENSYS_API_SECRET: ${CENSYS_API_SECRET}

  db:
    image: postgres:latest
    volumes:
      - db_data:/var/lib/postgres

volumes:
  db_data:

Remove junk from docker compose
Remove junk from docker compose
