version: "3.8"
services:
  db:
    image: mariadb:10.11
    restart: unless-stopped
    volumes:
      - "../files/db:/var/lib/mysql"
    environment:
      MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
      MYSQL_DATABASE: ${DB_NAME}
      MYSQL_USER: ${DB_USER}
      MYSQL_PASSWORD: ${DB_PASSWORD}
  pastefy:
    image: interaapps/pastefy:latest
    restart: unless-stopped
    depends_on:
      - db
    expose:
      - "80"
    environment:
      HTTP_SERVER_PORT: 80
      HTTP_SERVER_CORS: ${HTTP_SERVER_CORS}
      DATABASE_DRIVER: mysql
      DATABASE_NAME: ${DB_NAME}
      DATABASE_USER: ${DB_USER}
      DATABASE_PASSWORD: ${DB_PASSWORD}
      DATABASE_HOST: db
      DATABASE_PORT: 3306
      SERVER_NAME: ${SERVER_NAME}
      OAUTH2_INTERAAPPS_CLIENT_ID: ${OAUTH2_INTERAAPPS_CLIENT_ID}
      OAUTH2_INTERAAPPS_CLIENT_SECRET: ${OAUTH2_INTERAAPPS_CLIENT_SECRET}
      OAUTH2_GITHUB_CLIENT_ID: ${OAUTH2_GITHUB_CLIENT_ID}
      OAUTH2_GITHUB_CLIENT_SECRET: ${OAUTH2_GITHUB_CLIENT_SECRET}
      OAUTH2_GOOGLE_CLIENT_ID: ${OAUTH2_GOOGLE_CLIENT_ID}
      OAUTH2_GOOGLE_CLIENT_SECRET: ${OAUTH2_GOOGLE_CLIENT_SECRET}
      OAUTH2_DISCORD_CLIENT_ID: ${OAUTH2_DISCORD_CLIENT_ID}
      OAUTH2_DISCORD_CLIENT_SECRET: ${OAUTH2_DISCORD_CLIENT_SECRET}
      OAUTH2_TWITCH_CLIENT_ID: ${OAUTH2_TWITCH_CLIENT_ID}
      OAUTH2_TWITCH_CLIENT_SECRET: ${OAUTH2_TWITCH_CLIENT_SECRET}
