version: '3'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: joerg-app
    ports:
      - '80:80'
    volumes:
      - ./:/var/www
    links:
      - db
    networks:
      - joerg
    restart: unless-stopped
    working_dir: /var/www

  db:
    image: mysql:8
    container_name: joerg-db
    restart: unless-stopped
    volumes:
      - mysql:/var/lib/mysql
    networks:
      - joerg
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_PASSWORD: lmaa,dw.
      MYSQL_USER: web104
      MYSQL_DATABASE: usr_web104_1

networks:
  joerg:

volumes:
  mysql: