version: '2.1'
services:
  db:
    image: mysql
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=True
      - MYSQL_DATABASE=quilt
    healthcheck:
      test: ["CMD", "mysql", "-u", "root", "-e", "select 1"]
      interval: 1m
      timeout: 10s
      retries: 3
  migration:
    image: quiltdata/server
    environment:
      - AWS_ACCESS_KEY_ID=ddccbbaa
      - AWS_SECRET_ACCESS_KEY=abcd
      - QUILT_SERVER_CONFIG=test_config.py
      - OAUTH_CLIENT_SECRET=TESTING
    depends_on:
      db:
        condition: service_healthy
    command:
      flask db upgrade
  flask:
    image: quiltdata/flask
    environment:
      - AWS_ACCESS_KEY_ID=ddccbbaa
      - AWS_SECRET_ACCESS_KEY=abcd
      - QUILT_SERVER_CONFIG=test_config.py
      - OAUTH_CLIENT_SECRET=TESTING
      - OAUTHLIB_INSECURE_TRANSPORT=1
    ports:
      - "9000:9000"
    depends_on:
      db:
        condition: service_healthy
  nginx:
    image: quiltdata/nginx
    ports:
      - "5000:80"
    depends_on:
      db:
        condition: service_healthy
  s3:
    image: quiltdata/nginx-s3-proxy
    ports:
      - "5001:5001"
  auth:
    image: quiltdata/auth
    ports:
      - "5002:5002"  

version: '2.1'
services:
  db:
    image: mysql
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=True
      - MYSQL_DATABASE=quilt
    healthcheck:
      test: ["CMD", "mysql", "-u", "root", "-e", "select 1"]
      interval: 1m
      timeout: 10s
      retries: 3
  migration:
    image: quiltdata/flask
    environment:
      - AWS_ACCESS_KEY_ID=ddccbbaa
      - AWS_SECRET_ACCESS_KEY=abcd
      - QUILT_SERVER_CONFIG=test_config.py
      - OAUTH_CLIENT_SECRET=TESTING
    depends_on:
      db:
        condition: service_healthy
    command:
      flask db upgrade
  flask:
    image: quiltdata/flask
    environment:
      - AWS_ACCESS_KEY_ID=ddccbbaa
      - AWS_SECRET_ACCESS_KEY=abcd
      - QUILT_SERVER_CONFIG=test_config.py
      - OAUTH_CLIENT_SECRET=TESTING
      - OAUTHLIB_INSECURE_TRANSPORT=1
    ports:
      - "9000:9000"
    depends_on:
      db:
        condition: service_healthy
  nginx:
    image: quiltdata/nginx
    ports:
      - "5000:80"
    depends_on:
      db:
        condition: service_healthy
  s3:
    image: quiltdata/nginx-s3-proxy
    ports:
      - "5001:5001"
  auth:
    image: quiltdata/auth
    ports:
      - "5002:5002"  

Rename server image for migration container
Rename server image for migration container

The container that does the migration needs to use the same image to
run as the package server (now flask).
