RubinLab / epad-dist

5 stars 5 forks source link

Redirect Auth URL ERROR #23

Open waybarrios opened 3 years ago

waybarrios commented 3 years ago

I just followed all steps as you mentioned in readme to use epadlite with docker-compose. However, I haven't used yet because I got an issue with redirect url when I accessed to epad url. it always redict to localhost, it doesn't make sense for me.

redirect url: http://localhost:8899/auth/realms/ePad/protocol/openid-connect/auth?client_id=epad-auth&redirect_uri=http%3A%2F%2F25.2.163.181%3A8000%2F&state=2fb93483-d43c-40d0-9dd0-611f07b93f4b&response_mode=fragment&response_type=code&scope=openid&nonce=9b470151-a250-4103-8df2-f72638d0b15e

Docker-compose:

version: "3"
services:
  myepadjs:
    build: ./epadjs
    container_name: epad_js
    expose:
      - "8000"
    ports:
      - "8000:8000"
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
    environment:
      REACT_APP_AUTH_URL: "http://25.2.163.181:8000/keycloak/auth"
      PUBLIC_URL: "http://25.2.163.181:8000"
      REACT_APP_API_URL: "http://25.2.163.181:8000/api"
      REACT_APP_WADO_URL: "wadouri:http://25.2.163.181:8000/pacs"
      REACT_APP_BASE_URL: ""
      REACT_APP_AUTH_MODE: ""
      REACT_APP_MODE: "lite"
    depends_on:
      - myepadlite
    networks:
      - epad-network
  mykeycloak:
    build: ./keycloak
    container_name: epad_keycloak
    environment:
      - KEYCLOAK_USER=admin
      - KEYCLOAK_PASSWORD=vivamed123
      - DB_VENDOR=H2
      - PROXY_ADDRESS_FORWARDING=True
    expose:
       - "8899"
    command:
      - "-b 0.0.0.0"
      - "-Dkeycloak.import=/opt/jboss/keycloak/realm-export.json,/opt/jboss/keycloak/realm-export_epad.json"
    ports:
      - "8899:8080"
    volumes:
      - ./realm-export.json:/opt/jboss/keycloak/realm-export.json
      - ./realm-export_epad.json:/opt/jboss/keycloak/realm-export_epad.json
      - ./terms.ftl:/opt/jboss/keycloak/themes/base/login/terms.ftl
    depends_on:
      - mycouchdb
    networks:
      - epad-network
  mycouchdb:
    image: apache/couchdb:2.3.1
    container_name: epad_couchdb
    expose:
      - "8887"
    ports:
      - "8887:5984"
    volumes:
      - "../couchdbloc:/opt/couchdb/data"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5984"]
      interval: 1m30s
      timeout: 1m
      retries: 10
    depends_on:
      - mymariadb
    networks:
      - epad-network
  mymariadb:
    image: rubinlab/mariadb:latest
    container_name: epad_mariadb
    restart: always
    healthcheck:
      test: "/usr/bin/mysql --user=admin --password=admin --execute \"SHOW DATABASES;\""
      interval: 3s
      timeout: 1s
      retries: 5
    # expose:
    #   - "3306"
    # ports:
    #   - "3306:3306"
    command: --init-file /data/application/init.sql
    volumes:
      - ../mariadbloc:/var/lib/mysql
      - ./epaddb_nodata.sql:/data/application/init.sql
    environment:
      MYSQL_DATABASE: epaddb
      MYSQL_USER: admin
      MYSQL_PASSWORD: admin
      MYSQL_ROOT_PASSWORD: admin
    networks:
      - epad-network
  mydicomweb:
    build: ./dicomweb-server
    container_name: epad_dicomweb
    # expose:
    #   - "8090"
    # ports:
    #   - "8090:8090"
    environment:
      DB_SERVER: "http://epad_couchdb"
      DB_NAME: "chronicle"
      AUTH: "none"
      LOGGER: "true"
      PREFIX: "/pacs"
    depends_on:
      - mykeycloak
    healthcheck:
      test: ["CMD", "pm2", "show", "DICOMwebServer"]
      interval: 1m30s
      timeout: 1m
      retries: 10
    networks:
      - epad-network
  myepadlite:
    build: ./epadlite
    container_name: epad_lite
    # expose:
    #   - "8080"
    # ports:
    #   - "8080:8080"
    environment:
      NOSQL_DB_HOST: "http://epad_couchdb"
      NOSQL_DB_NAME: "epadlite"
      LOGGER: "true"
      HTTPS: "false"
      MODE: "lite"
      PREFIX: "api"
      SQL_DB_HOST: "epad_mariadb"
      SQL_DB_NAME: "epaddb"
      SQL_USER: "admin"
      SQL_PASS: "admin"
      SQL_LOGGER: "false"
      AUTH_URL: "http://25.2.163.181:8000/keycloak"
      DICOMWEB_BASEURL: "http://epad_dicomweb:8090/pacs"
      AUTH: "auth"
      AUTH_USERINFO_URL: "{epadlite_authuserinfourl}"
    volumes:
      - ../data:/home/node/app/data
    depends_on:
      - mydicomweb
    healthcheck:
      test: ["CMD", "pm2", "show", "ePADlite"]
      interval: 1m30s
      timeout: 1m
      retries: 10
    networks:
      - epad-network
networks:
  epad-network:
    driver: bridge
emelalkim commented 3 years ago

hi, did you download epad-dist from downloads or pull the latest from github? can you try pulling the latest epad-dist or downloading the latest from epad website (we just made a release) and trying again? i believe the bug causing this is already fixed. let us know if you still have problems