services:
  app:
    build: .
    container_name: website_rt_app
    restart: unless-stopped
    working_dir: /var/www
    volumes:
      - ./:/var/www
    depends_on:
      - db
  web:
    image: nginx:alpine
    container_name: website_rt_web
    restart: unless-stopped
    ports:
      - "8088:80"
    volumes:
      - ./:/var/www
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app
  db:
    image: mariadb:10.11
    container_name: website_rt_db
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: website_rt
      MYSQL_USER: website_rt
      MYSQL_PASSWORD: password_rt
      MYSQL_ROOT_PASSWORD: root_password_rt
    volumes:
      - db_data:/var/lib/mysql
volumes:
  db_data:
