app:
  image: mycompany/myapp:latest

db:
  image: mysql
  hostname: db
  expose:
    - "3306"
  environment:
    MYSQL_ROOT_PASSWORD: password 
    MYSQL_DATABASE: app_db
    MYSQL_USER: dbuser
    MYSQL_PASSWORD: password

agent:
  image: mycompany/myapp-agent:latest
  volumes:
    - ../ansible/agent:/ansible
  command: site.yml --extra-vars="probe_host=db probe_port=3306"
app:
  image: mycompany/myapp-release:latest
  extra_hosts:
    bob: 8.8.8.8
  environment:
    DJANGO_SETTINGS_MODULE: mysite.settings.base
    MYSQL_ROOT_PASSWORD: pass1234 
    MYSQL_DATABASE: sampledjangoapp
    MYSQL_USER: sampledjangoapp
    MYSQL_PASSWORD: pass1234
    MYSQL_HOST: db

db:
  image: mysql
  hostname: db
  expose:
    - "3306"
  environment:
    MYSQL_ROOT_PASSWORD: pass1234 
    MYSQL_DATABASE: sampledjangoapp
    MYSQL_USER: sampledjangoapp
    MYSQL_PASSWORD: pass1234

agent:
  image: mycompany/myapp-agent:latest
  volumes:
    - ../ansible/agent:/ansible
  command: site.yml --extra-vars="probe_host=db probe_port=3306"
Add environment variables for MySQL support
Add environment variables for MySQL support
