Registry Mirror
Skip to content

Caddyfile #325

Open
Open

Description

@VladimirCores

Feature Description
It would be great to have Caddyfile and caddy service in docker-compose which exposes authorizer service to https.

Activity

  1. added
    enhancement
    on Feb 15, 2023
  2. VladimirCores commented on Feb 15, 2023

    @VladimirCores
    Author

    Strange but this settings does not work:

    localhost:443 {
    	handle /auth/* {
    		reverse_proxy authorizer:4444
    	}
    	handle / {
    		respond "root empty"
    	}
    }
    localhost:80 {
    	respond "HTTP is not available use HTTPS"
    }
    
  3. VladimirCores commented on Feb 15, 2023

    @VladimirCores
    Author

    docker-compose.yaml

    version: '3.9'
    services:
      authorizer:
        container_name: authorizer
        build: .
        ports:
          - "4444:8080"
        env_file:
          - .env
      caddy:
        image: caddy:latest
        restart: unless-stopped
        container_name: caddy
        ports:
          - 80:80
          - 443:443
        volumes:
          - ./caddy:/etc/caddy
        links:
          - "authorizer"
    
  4. lakhansamani commented on Feb 15, 2023

    @lakhansamani
    Contributor

    @VladimirCores thank you for sharing this. I will update it.

  5. VladimirCores commented on Feb 15, 2023

    @VladimirCores
    Author

    With subdomain all works:

    auth.localhost {
    	reverse_proxy authorizer:8080
    }
    localhost:80 {
    	respond "HTTP is not available use HTTPS"
    }
    
  6. VladimirCores commented on Feb 15, 2023

    @VladimirCores
    Author

    Oh man, trying your system for second time and faced so many problems, things that not documented. It works localhost but when serving from cloud VPS facing a lot of problems.

    Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin '/app' in a call to 'postMessage'.
    
  7. lakhansamani commented on Feb 16, 2023

    @lakhansamani
    Contributor

    @VladimirCores can you pls share reproducible steps so that we can debug and fix it.

    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions