{
    admin off
    auto_https off
}

:80 {
    encode zstd gzip

    handle_path {$URL_PREFIX:/address-service/}django-static/* {
        root * /app/staticfiles
        file_server
    }

    handle {$URL_PREFIX:/address-service/}api* {
        reverse_proxy 127.0.0.1:8001
    }

    handle {$URL_PREFIX:/address-service/}admin* {
        reverse_proxy 127.0.0.1:8001
    }

    handle_path {$URL_PREFIX:/address-service/}* {
        root * /app/client
        try_files {path} /index.html
        file_server
    }

    log {
        output stdout
        format console
    }
}
