erictik / midjourney-ui

Midjourney UI is an open source AI painting UI based on Midjourney
https://midjourney-ui.vercel.app
Apache License 2.0
343 stars 118 forks source link

Add auth && vary region #56

Open SoyZhou opened 11 months ago

SoyZhou commented 11 months ago

Enable Auth

  1. No auth

No addition environment variables required.

  1. Code

    NEXT_PUBLIC_AUTH_PROVIDER=code
    NEXT_PUBLIC_AUTH_CODE=123456

    Input auth code to launch app

    codelogin
  2. Netlify

    export NEXT_PUBLIC_AUTH_PROVIDER=netlify

    Need open netlify identity on netlify.

Enable Vary Region

varyregion
  1. Local setting
    
    # for macOS
    export PUPPETEER_CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

for windows (Depends on your installation path)

export PUPPETEER_CHROME_BIN="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"


2. Docker

Add the follow content into `Dockerfile`, and rebuild docker image:
```Dockerfile
RUN apk add -q --update --no-cache \
      chromium \
      nss \
      freetype \
      freetype-dev \
      harfbuzz \
      ca-certificates \
      ttf-freefont

ENV PUPPETEER_CHROME_BIN="/usr/bin/chromium-browser"
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
  1. Netlify

Since the function has a 10s limit, it can't be called successfully.

netlify[bot] commented 11 months ago

Deploy request for midjourneyui pending review.

Visit the deploys page to approve it

Name Link
Latest commit d1cc0bd4942403b4b9ce84a6880ae0f8fa1c90aa
vercel[bot] commented 11 months ago

@SoyZhou is attempting to deploy a commit to the erictik Team on Vercel.

A member of the Team first needs to authorize it.