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

docker setup some problems #1170

Open
hozansahin opened this issue Sep 3, 2024 · 5 comments
Open

docker setup some problems #1170

hozansahin opened this issue Sep 3, 2024 · 5 comments

Comments

@hozansahin
Copy link

hozansahin commented Sep 3, 2024

Hi There,
https://github.com/linagora/tmail-flutter/blob/master/docker-compose.yaml
I created my own docker-compose file using this directive and below is what worked. On port 80 and 443 I need to use other different port where nginx works
my docker-compose.yaml

version: "3.9"
networks:
    1panel-network:
        external: true
services:
  tmail-frontend:
    image: linagora/tmail-web:master
    container_name: tmail-frontend
    ports:
      - "8180:80"
    volumes:
      - ./env.file:/usr/share/nginx/html/assets/env.file
    networks:
      - 1panel-network
    depends_on:
      - tmail-backend

  tmail-backend:
    image: linagora/tmail-backend:memory-branch-master
    container_name: tmail-backend
    volumes:
      - ./jwt_publickey:/root/conf/jwt_publickey
      - ./jwt_privatekey:/root/conf/jwt_privatekey
    ports:
      - "88:80"
    networks:
      - 1panel-network

My env.file

SERVER_URL=https://posta.thirdcode.org
DOMAIN_REDIRECT_URL=https://posta.thirdcode.org:3000
WEB_OIDC_CLIENT_ID=teammail-web
OIDC_SCOPES=openid,profile,email,offline_access
APP_GRID_AVAILABLE=supported
FCM_AVAILABLE=supported
IOS_FCM=supported
FORWARD_WARNING_MESSAGE=

I use cloudflare tunnel and my configuration is in the image below:
resim

I cannot log in to any of the demo accounts. it gives a connection error. can you help with this.

resim

@chibenwa
Copy link
Member

chibenwa commented Sep 3, 2024

Can you use developer tools and report the exact query that fail, please?

@hozansahin
Copy link
Author

Can you use developer tools and report the exact query that fail, please?

image
405 Method Not Allowed
image

Har File:
https://nc.thirdcode.org/s/wfxgKyGc3YdQFzE

Console Output:

translater.js:37 [Twake Mail] Current Language:  tr
translater.js:53 [Twake Mail] Error loading tr resources: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
loadLanguageResources @ translater.js:53
translater.js:55 [Twake Mail] Using default English resources: Object
worker_service.js:85 [TwakeMail] getPlatform():  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
worker_service.js:109 [TwakeMail] initialWorkerService(): OriginInUrl: Location
translater.js:37 [Twake Mail] Current Language:  tr
main.dart.js:56456 Got object store box in database encryptionkeycache.
main.dart.js:56456 Got object store box in database emailcache.
main.dart.js:56456 Got object store box in database recentloginurlcache.
main.dart.js:56456 Got object store box in database recentsearchcache.
main.dart.js:56456 Got object store box in database recentloginusernamecache.
main.dart.js:56456 Got object store box in database accountcache.
login:1 Access to XMLHttpRequest at 'https://posta.thirdcode.org/.well-known/webfinger?resource=https://posta.thirdcode.org&rel=http://openid.net/specs/connect/1.0/issuer' from origin 'http://5.180.254.233:8180' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
posta.thirdcode.org/.well-known/webfinger?resource=https://posta.thirdcode.org&rel=http://openid.net/specs/connect/1.0/issuer:1 
        
        
       Failed to load resource: net::ERR_FAILED

@chibenwa
Copy link
Member

chibenwa commented Sep 3, 2024

Make sure to forward OPTIONS (cors) call to the Twake Mail backend server - or allow everything.

@hozansahin
Copy link
Author

Make sure to forward OPTIONS (cors) call to the Twake Mail backend server - or allow everything.

I guess I can't communicate with the backend side, I can't do that, can you help me with this?

@Arsnael
Copy link
Member

Arsnael commented Sep 4, 2024

Hi,

The error seems here:

login:1 Access to XMLHttpRequest at 'https://posta.thirdcode.org/.well-known/webfinger?resource=https://posta.thirdcode.org&rel=http://openid.net/specs/connect/1.0/issuer' from origin 'http://5.180.254.233:8180' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Missing an Access-Control-Allow-Origin header for cors. I don't know much about cloudflare tunnel but maybe it's removing it somehow from the original request? You might want to check that

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

3 participants