version: "3.2"

volumes:
  keymaterial:

secrets:
  mysql-root-password:
    file: docker/secrets/mysql-root-password
  mysql-password:
    file: docker/secrets/mysql-password
  admin-password:
    file: docker/secrets/admin-password

services:

  db:
    image: mysql
    environment:
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql-root-password
      MYSQL_PASSWORD_FILE: /run/secrets/mysql-password
      MYSQL_USER: "panopticlick"
      MYSQL_DATABASE: "panopticlick"
    volumes:
      - ./examples/sql:/docker-entrypoint-initdb.d
    secrets:
      - mysql-root-password
      - mysql-password
    entrypoint: ['/entrypoint.sh', '--default-authentication-plugin=mysql_native_password'] 

  app:
    build: .
    links:
      - db:db
    volumes:
      - .:/opt
      - keymaterial:/tmp
    secrets:
      - mysql-password
      - admin-password

  cron:
    build: .
    entrypoint: []
    command: bash -c 'touch /etc/crontab && cron -f'
    volumes:
      - keymaterial:/tmp
    secrets:
      - admin-password

  nginx:
    image: nginx
    links:
      - app:app
    volumes:
      - ./examples/nginx/extra:/etc/nginx/extra
      - ./examples/nginx/conf.d:/etc/nginx/conf.d
    ports:
      - "443:443"

version: "3.2"

volumes:
  keymaterial:

secrets:
  mysql-root-password:
    file: docker/secrets/mysql-root-password
  mysql-password:
    file: docker/secrets/mysql-password
  admin-password:
    file: docker/secrets/admin-password

services:

  db:
    image: mysql
    environment:
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql-root-password
      MYSQL_PASSWORD_FILE: /run/secrets/mysql-password
      MYSQL_USER: "panopticlick"
      MYSQL_DATABASE: "panopticlick"
    volumes:
      - ./examples/sql:/docker-entrypoint-initdb.d
    secrets:
      - mysql-root-password
      - mysql-password
    entrypoint: ['/entrypoint.sh', '--default-authentication-plugin=mysql_native_password'] 

  app:
    build: .
    volumes:
      - .:/opt
      - keymaterial:/tmp
    secrets:
      - mysql-password
      - admin-password

  cron:
    build: .
    entrypoint: []
    command: bash -c 'touch /etc/crontab && cron -f'
    volumes:
      - keymaterial:/tmp
    secrets:
      - admin-password

  nginx:
    image: nginx
    volumes:
      - ./examples/nginx/extra:/etc/nginx/extra
      - ./examples/nginx/conf.d:/etc/nginx/conf.d
    ports:
      - "443:443"

Remove obsolete links from compose file
Remove obsolete links from compose file
