version: '3.3'

services:
  oonyeje-portfolio:
    image: gitea.bsidesolutions.net/oonyeje/oonyeje-portfolio:${DRONE_COMMIT_SHA:0:7}
    build:
      context: ./
      dockerfile: Dockerfile
    ports:
      - "6000:3000"
    volumes:
      - .:/home/node/app
      - ./node_modules:/home/node/app/node_modules
    environment:
      - SMTP_PROXY_EMAIL=${SMTP_PROXY_EMAIL}
      - SMTP_RECIPIENT_EMAIL=${SMTP_RECIPIENT_EMAIL}
      - SMTP_HOST=${SMTP_HOST}
      - SMTP_PORT=${SMTP_PORT}
      - SMTP_USERNAME=${SMTP_USERNAME}
      - SMTP_PASSWORD=${SMTP_PASSWORD}
      - NEXT_PUBLIC_GOOGLE_APPOINTMENTS_LINK=${NEXT_PUBLIC_GOOGLE_APPOINTMENTS_LINK}
      - RECAPTCHA_SECRET_KEY=${RECAPTCHA_SECRET_KEY}
      - NEXT_PUBLIC_RECAPTCHA_SITE_KEY=${NEXT_PUBLIC_RECAPTCHA_SITE_KEY}
    working_dir: /home/node/app/
    command: sh -c "yarn install && yarn dev"
