services: db: container_name: db image: mysql:latest environment: MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD} MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} app: container_name: app image: python:latest depends_on: - db volumes: - .:/code entrypoint: ./code/docker-entrypoint.sh command: init_database