namecheap / ilc

Enterprise-ready framework for Micro Frontends composition into SPA with SSR & i18n support
http://ilc.namecheap.technology
Other
720 stars 46 forks source link

Registry UI credentials invalid (when using postgres?) #617

Open asos-tomp opened 1 month ago

asos-tomp commented 1 month ago

When configuring the demo, the ILC registry at http://localhost:4001/#/login seems to briefly load, then redirect back to the login due to an unauthorized access of http://localhost:4001/api/v1/app?filter=%7B%7D&range=%5B0%2C24%5D&sort=%5B%22id%22%2C%22ASC%22%5D

image

N.B. I changed to postgres from mysql due to lack of amd64 image. Hence, changed the docker-compose.yaml to:

version: '2.4'
services:
    registry:
        image: namecheap/ilc_registry:latest
        ports:
            - '4001:4001'
        environment:
            NODE_ENV: production
            DB_CLIENT: pg
            DB_HOST: postgres
            DB_USER: root
            DB_PASSWORD: pwd
            DB_NAME: ilc
        depends_on:
            postgres:
                condition: service_healthy
    registry_worker:
        image: namecheap/ilc_registry:latest
        command: ['npm', 'run', 'assetsdiscovery']
        environment:
            NODE_ENV: production
            DB_CLIENT: pg
            DB_HOST: postgres
            DB_USER: root
            DB_PASSWORD: pwd
            DB_NAME: ilc
        network_mode: 'service:ilc' # We need this to make apps accessible at 127.0.0.1
        depends_on:
            postgres:
                condition: service_healthy
    ilc:
        image: namecheap/ilc:latest
        restart: always
        ports:
            - '80:8233'
            - '8233:8233'
            - '8234-8240:8234-8240' # Ports from "demo-apps" container
        environment:
            NODE_ENV: production
            REGISTRY_ADDR: 'http://host.docker.internal:4001'
            OVERRIDE_CONFIG_TRUSTED_ORIGINS: all
    demo-apps:
        image: namecheap/ilc-demo-apps:latest
        network_mode: 'service:ilc' # We need this to make apps accessible at 127.0.0.1 inside "ilc" container
        env_file:
            - ./demo-apps.env # Used by the demo site to override PUBLIC_HOST var
    postgres:
        container_name: postgres
        image: postgres:15.6-alpine
        restart: always
        environment:
            POSTGRES_USER: root
            POSTGRES_PASSWORD: pwd
            POSTGRES_DB: ilc
        ports:
            - '5432:5432'
        volumes:
            - postgres:/var/lib/postgresql/data
        healthcheck:
            test: ['CMD-SHELL', "sh -c 'pg_isready -U root -d ilc'"]
            interval: 3s
            timeout: 3s
            retries: 50
volumes:
    postgres:
        driver: local
blackrabbit99 commented 1 month ago

Thanks for the issue. We will take a look shortly.