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

CAN'T Use Ctrl+C to COPY in ​self-host #6984

Closed
1 task done
rcqed opened this issue May 18, 2024 · 7 comments
Closed
1 task done

CAN'T Use Ctrl+C to COPY in ​self-host #6984

rcqed opened this issue May 18, 2024 · 7 comments

Comments

@rcqed
Copy link

rcqed commented May 18, 2024

What happened?

COPY is not work, I CAN'T Use Ctrl+C or Ctrl+X to COPY, and I can't click the copy button to copy, but the Ctrl+V is work.

versions: stable-7e7a412

Distribution version

Windows x64

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

Microsoft Edge

Are you self-hosting?

  • Yes

Relevant log output

services:
  affine:
    image: ghcr.io/toeverything/affine-graphql:stable-7e7a412
    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
      - /volume1/docker/affine/self-host/config:/root/.affine/config
      # blob storage
      - /volume1/docker/affine/self-host/storage:/root/.affine/storage
    logging:
      driver: 'json-file'
      options:
        max-size: '1000m'
    restart: always
    environment:
      - NODE_OPTIONS="--import=./scripts/register.js"
      - AFFINE_CONFIG_PATH=/root/.affine/config
      - REDIS_SERVER_HOST=redis
      - DATABASE_URL=postgres://affine:affine@postgres:5432/affine
      - NODE_ENV=production
      - AFFINE_ADMIN_EMAIL=test@affine.pro
      - AFFINE_ADMIN_PASSWORD=123456789
      - AFFINE_SERVER_HOST=0.0.0.0
  redis:
    image: redis:6.0.20-bookworm
    container_name: affine_redis
    restart: always
    volumes:
      - /volume1/docker/affine/self-host/redis:/data
    healthcheck:
      test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
      interval: 10s
      timeout: 5s
      retries: 5
  postgres:
    image: postgres:16.2-bookworm
    container_name: affine_postgres
    restart: always
    volumes:
      - /volume1/docker/affine/self-host/postgres:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U affine']
      interval: 10s
      timeout: 5s
      retries: 5
    environment:
      POSTGRES_USER: affine
      POSTGRES_PASSWORD: affine
      POSTGRES_DB: affine
      PGDATA: /var/lib/postgresql/data/pgdata

Anything else?

image

@affine-issue-bot
Copy link

affine-issue-bot bot commented May 18, 2024

Issue Status: ✅ Answered

✅ Answered

The issue actually turned out to be a question or a misunderstanding, and it has been answered or resolved.

This is an automatic reply by the bot.

@Xyndra
Copy link

Xyndra commented May 19, 2024

+1

@vjalmr
Copy link

vjalmr commented May 19, 2024

I had this issue as well, and found out that certain features are disabled if you are not in an HTTPS environment.

My solution was to install this container: Docker Reverse Proxy
And followed the instructions.

It's basically a Caddy Server, which has some sane defaults and is easy to set up.

After I set that up, copy, paste, cut, and images were no longer a problem.

Note: This was running on a linux box, though I don't think that will make a difference besides the hosts setup. I am not familiar with that on Windows.

@rcqed
Copy link
Author

rcqed commented May 20, 2024

I had this issue as well, and found out that certain features are disabled if you are not in an HTTPS environment.

My solution was to install this container: Docker Reverse Proxy And followed the instructions.

It's basically a Caddy Server, which has some sane defaults and is easy to set up.

After I set that up, copy, paste, cut, and images were no longer a problem.

Note: This was running on a linux box, though I don't think that will make a difference besides the hosts setup. I am not familiar with that on Windows.

you are right, it works when i use the HTTPS

@rcqed
Copy link
Author

rcqed commented May 20, 2024

Status

it just cant use when we use the http, and you have review it on HTTP, not https maybe

@EYHN
Copy link
Member

EYHN commented May 20, 2024

This is because the browser does not allow web pages to access your clipboard in http environment. There's nothing affine can do at this point

@EYHN EYHN closed this as completed May 20, 2024
@Xyndra
Copy link

Xyndra commented May 20, 2024

Yes it can! It can notify someone what is happening and why, and it can also hold a local clipboard on the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Answered
Development

No branches or pull requests

4 participants