datarecall's avatar

Sail Share (ubuntu) refused connection

I am running laravel sail on ubuntu everything is working fine but I need to enable SSL to test webhooks here is my docker compose file

# For more information: https://laravel.com/docs/sail
version: '3'
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.0
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.0/app
        extra_hosts:
            - 'host.docker.internal:host-gateway'
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
            XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
            XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mariadb
            - redis
            - selenium
    mariadb:
        image: 'mariadb:10'
        ports:
            - '${FORWARD_DB_PORT:-3306}:3306'
        environment:
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        volumes:
            - 'sailmariadb:/var/lib/mysql'
        networks:
            - sail
        healthcheck:
            test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
            retries: 3
            timeout: 5s
    redis:
        image: 'redis:alpine'
        ports:
            - '${FORWARD_REDIS_PORT:-6379}:6379'
        volumes:
            - 'sailredis:/data'
        networks:
            - sail
        healthcheck:
            test: ["CMD", "redis-cli", "ping"]
            retries: 3
            timeout: 5s
    mailhog:
        image: 'mailhog/mailhog:latest'
        ports:
            - '${FORWARD_MAILHOG_PORT:-1025}:1025'
            - '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
        networks:
            - sail
    selenium:
        image: 'selenium/standalone-chrome'
        volumes:
            - '/dev/shm:/dev/shm'
        networks:
            - sail
networks:
    sail:
        driver: bridge
volumes:
    sailmariadb:
        driver: local
    sailredis:
        driver: local

Neither the Expose SSL or regular URL work the SSL flat out says unable to connect, while the non-ssl just sits in an infinite loop of loading it shows in the dash board as a connection but nothing ever shows in the browser.

The local-url host.docker.internal:80 worked fine after I edited /etc/hosts and pointed it properly.

0 likes
7 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

I personally gave up and tried ngrok instead. It worked right away

1 like
datarecall's avatar

@Sinnbeck That worked wayyyy better lol spent hours trying to get this to work, one other question for you. When you run ngrox do you change your APP_URL so assets and everything works ? Or is there an easy way to set this up so it automatically does it?

Sinnbeck's avatar

@datarecall I only use it to test webhooks, so I don't really care about assets. I still use the normal dev url when working on the site

I think I've had to use it once for frontend (to show our designer), and I just changed the ASSET_URL

Please or to participate in this conversation.