Issue Summary

Trying to set up the latest Redash on Windows 10 with Docker. I think I have most of it set up correctly. But the ‘npm run build’ command apparently causes linux-specific commands to be used, so it fails on Windows. Without this, it seems the account creation page has broken styles and images. And after creating an account, all I see is error messages.

I assume getting this npm command to work on Windows is my hang up. I tried version 8 of redash as well, thinking that maybe it was more Windows compatible, but it caused postgres to go into an infinite restart loop because of no admin password being set.

Technical details:

  • Redash Version: 9.0.0-beta

  • Browser/OS: Windows 10, Build 19042

  • How did you install Redash: I used the steps available at https://redash.io/help/open-source/dev-guide/docker. However, they didn’t work quite correctly with Windows, so I ended up doing this:

    rmdir redash /s /q

    git config --global core.eol lf
    git config --global core.autocrlf input

    git clone https://github.com/getredash/redash.git

    git config --global core.eol crlf
    git config --global core.autocrlf true

    cd redash
    docker compose up -d

    npm install

    docker-compose run --rm server create_db
    docker-compose run --rm postgres psql -h postgres -U postgres -c “create database tests”

From the setup guide:

Windows users: while it should be possible to run Redash on a Windows machine, we don’t know anyone who did this and lived to tell. We recommend using some sort of a virtual machine or Docker in such case.

The only way I can think to do this would be to run npm run build inside the Docker container. Which will be very slow but should get you around the linux-specific failures.

That’s kind of where I was leaning. I did see that portion of the setup guide, but I thought that was in reference to running the redash server itself. I figured using Docker got me around that problem, but I guess not. Haven’t used Docker before, so I guess I’ll have to figure out how to run that inside the container.

Finally got everything working and without running npm inside the container. For those wondering, I put everything I did within a batch file. This also has some commands to enable connection to a local instance of SQL Server for a data source…

rmdir redash /s /q

git config --global core.eol lf
git config --global core.autocrlf input

git clone https://github.com/getredash/redash.git

git config --global core.eol crlf
git config --global core.autocrlf true

cd redash

powershell -Command "(get-content docker-compose.yml).replace('\"5000:5000\"', "\"`\"5000:5000`\"`r`n` ` ` ` ` ` - `\"1433:1433`\"\"") | Out-File -encoding ASCII docker-compose.yml"

docker-compose up -d

start /wait cmd /c "npm install"
powershell -Command "(gc package.json) -replace 'rm -rf ./client/dist/', 'rmdir /s /q .\\client\\dist & exit 0' | Out-File -encoding ASCII package.json"
powershell -Command "(gc package.json) -replace 'NODE_ENV=', 'SET NODE_ENV=' | Out-File -encoding ASCII package.json"
powershell -Command "(gc viz-lib\package.json) -replace 'rm -rf lib dist', 'rmdir /s /q lib & rmdir /s /q dist' | Out-File -encoding ASCII viz-lib\package.json"

docker-compose run --rm server create_db
docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests"

start /wait cmd /c "npm run build"
start cmd /c "npm run start"