DokployD
Dokploy2y ago
1 reply
craintes

docker-compose custom wildcard domain

I want to setup a wildcard domain and a root domain for my app. I have the following compose file:
services:
    redis:
        image: redis:alpine
        volumes:
            - redis-data:/data
        networks:
            - base-network

    app:
        image: ghcr.io/cestef/uses.ink:latest
        ports:
            - "8765:8765"
        env_file:
            - .env
        depends_on:
            - redis
        networks:
            - base-network
            - dokploy-network
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.uses-ink-router.entrypoints=websecure"
            - "traefik.http.routers.uses-ink-router.tls.certResolver=letsencrypt"
            - "traefik.http.routers.uses-ink-router.rule=HostRegexp(`^.*\\.?uses\\.ink$`)"
            - "traefik.http.services.uses-ink-router.loadbalancer.server.port=8765"

volumes:
    redis-data:

networks:
    base-network:
        driver: bridge
    dokploy-network:
        external: true

Notice the HostRegexp, I want both *.uses.ink and uses.ink to point to my container.
When I go to uses.ink, I just get a plain "404 page not found"
Any idea why this is happening ?
I am using let's encrypt and have correctly setup two dns records pointing to both the wildcard and apex domain
Was this page helpful?