services:
  app:
    build:
      context: .
      dockerfile: ./.docker/Dockerfile
    container_name: avocado-edition-app
    volumes:
      - ./AvocadoEdition:/var/www/html
    ports:
      - ${APP_PORT:-80}:80
    depends_on:
      - db
    restart: unless-stopped
  db:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: avocado-edition-db
    volumes:
      - mariadb:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Seoul
      - MYSQL_ROOT_PASSWORD=${ROOT_ACCESS_PASSWORD:-avocadoedition}
      - MYSQL_DATABASE=${MYSQL_DATABASE:-avocadoedition}
      - MYSQL_USER=${MYSQL_USER:-avocadoedition}
      - MYSQL_PASSWORD=${DATABASE_PASSWORD:-avocadoedition}
    restart: unless-stopped
volumes:
  mariadb: