Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

​All my verification emails and magic links generated by Affine generate a http://localhost:3010/link instead of my domainname.com/link when user receive an email #8845

Open
1 task done
Elgokoo opened this issue Nov 16, 2024 · 0 comments

Comments

@Elgokoo
Copy link

Elgokoo commented Nov 16, 2024

What happened?

Hi,

I have installed AFFiNE 0.18.0-nightly-129ccea (Editor Version: 0.17.32) on my ubunty cloud with docker compose ,

Everything work well except :

1/ when I click to share button I get my domain.com prefix for shared links = good behavior

2/ When I send click for verification email or create a login magic link : the receiver receive the link with "localhost:3010 prefix instead of my domainname.com prefix = bad behavior

What did I miss in my setting to make all my link = my "domain name" instead of "localhost:3010" for links?

Thanks

Distribution version

Linux

What browsers are you seeing the problem on if you're using web version?

Other

Are you self-hosting?

  • Yes

Relevant log output

NGINX

server {
    listen 80;
    server_name mydomain.com;

    location / {
        proxy_pass http://localhost:3010;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

____________________

My compose.Yaml file

services:
  affine:
    image: ghcr.io/toeverything/affine-graphql:stable
    container_name: affine_selfhosted
    command:
      ['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js']
    ports:
      - '3010:3010'
      - '5555:5555'
    depends_on:
      redis:
        condition: service_healthy
      postgres:
        condition: service_healthy
    volumes:
      # custom configurations
      - ~/.affine/self-host/config:/root/.affine/config
      # blob storage
      - ~/.affine/self-host/storage:/root/.affine/storage
    logging:
      driver: 'json-file'
      options:
        max-size: '1000m'
    restart: unless-stopped
    
    environment:
      - NODE_OPTIONS="--import=./scripts/register.js"
      - AFFINE_CONFIG_PATH=/root/.affine/config
      - REDIS_SERVER_HOST=redis
      - DATABASE_URL=postgres://xxxxxx:xxxxxxxx@postgres:5432/xxxxxxx
      - NODE_ENV=production
      - [email protected]
      - AFFINE_ADMIN_PASSWORD=xxxxxxx
      - TELEMETRY_ENABLE=false  # Uncomment if you wish to disable telemetry
      - MAILER_HOST=smtp.xxxxxxxxx.net
      - MAILER_PORT=587
      - MAILER_USER=xxxxxxxxxxxxx
      - MAILER_PASSWORD=xxxxxxxxxxxxxx
      - MAILER_SENDER=xxxxxxxxxxx

  redis:
    image: redis:alpine
    container_name: affine_redis
    restart: unless-stopped
    volumes:
      - ~/.affine/self-host/redis:/data
    healthcheck:
      test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
      interval: 10s
      timeout: 5s
      retries: 5

  postgres:
    image: postgres:16-alpine
    container_name: affine_postgres
    restart: unless-stopped
    volumes:
      - ~/.affine/self-host/postgres:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U mo']
      interval: 10s
      timeout: 5s
      retries: 5
    environment:
      POSTGRES_USER: USer
      POSTGRES_PASSWORD: MYPSWD
      POSTGRES_DB: notesuperdata
      PGDATA: /var/lib/postgresql/data/pgdata

Anything else?

No response

@Elgokoo Elgokoo changed the title ​All my verification emails and magic links generate by Afine generate a http://localhost:3010/link instead of my domainname.com/link when user receive an email ​All my verification emails and magic links generated by Affine generate a http://localhost:3010/link instead of my domainname.com/link when user receive an email Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant