Hello

I am trying to make a basic hello world type change to the code. I changed /redash/templates/footer.html and /app/components/footer. The change was small, I just added an extra ‘a’ in front of the redash link. Now I would like to see this change on the website itself (not the webpack dev server, but the :80 production port).

I tried everything I could find including all 3 npm run commands (start, build and watch) and sudo supervisorctl restart redash_server. I can’t seem to get that extra ‘a’ to show up in production.

PS: Yes I cleared the browser cache. I can see the template still in app.js. So the app.js file is not being updated.

Achin

In case of production build, you need to do the following:

  1. Do the change in /opt/redash/current/client/app/components/footer/footer.html.
  2. Run npm run build.
  3. Restart the server supervisorctl restart redash_server.

If this didn’t help, try clearing browser cache.

Nope, sorry, no cake. It still doesn’t reflect the changes. I tried your steps. Also tried it in incognito. Is there any other way I can diagnose it?

Does it make a difference that I am running redash from the git clone of the repo instead of docker or any other format? Or that the directory’s name isn’t redash.

FYI (kind of off topic) I was trying the bootstrap installer on ubuntu 16.10 and it failed twice. Once on not finding setuptools and other casandra-driver on not finding cython. I had to manually install them both and rerun the boorstrap file. (I realize it’s not meant to be rerun but it seems to work out anyways). Only other thing is maybe delete /opt/redash at the beginning.

Ok so I finally figured it out.

My mistake was that I was doing all of this in my repo, but instead I should be doing it in /opt/redash. Now I can see my changes but this makes it tricky for me to deploy changes from my repo. How can I create such a flow that I pull changes into my own repo from a remote and then do something to send them to /opt/redash/current?

@arikfr,
I have redash running on ec2, (i think i clicked the easy install AMI)
the root of the ec2 has an /opt/redash directory,
but that just has the docker-compiose.tml, and the certs for https,
it does not have the …/current/client/ tree.

I can find the code in the redash server inside a container, but changing it there does not make it to the live .

npm is not installed on the root ec2 nor in the containers, and neither is supervisorctl. so that’s not helpful. I’m not sure what’s keeping my server up :slight_smile: (there’s an nginx dir inside the /opt redash , but the nginx.service file is nowhere to be found)

1 Like

ok, that was my attempt to shortcut.
if l follow the manual in https://redash.io/help/open-source/dev-guide/docker to get a whole docker environment, (after cloning v8.0.2)

after docker-compose up -d i get a bunch of errors on the build, eventually it runs, but going to http://localhost:5000/ produces errors

sqlalchemy.exc.OperationalError

OperationalError: (psycopg2.OperationalError) could not translate …


Has anyone had success running the 8.0.2 like this?
(that’s what I have installed and running, and therefore that’s the one I want to tweak. )


I had even more errors cloning master and trying to docker-compose this.

I must be missing something, because this was supposed to be the whole point of docker.


running the next commands

 
# Create tables

docker-compose run --rm server create_db

also results in an error
could not translate host name "postgres" to address: Name or service not known


applied :

that fixed it

you can ignore this, but i’m keeping this to track the steps that I had to do in case it helps

no it didn’t ,
it did get me past the install level, but level two (after picking the admin username) is an

IOError

IOError: [Errno 2] No such file or directory: ‘/app/redash/settings/…/…/client/dist/index.html’

(npm install OUTSIDE the container, seems to solve some of this, but it hangs at another stage. )
https://github.com/getredash/redash/issues/1578

suggests this has been solved in https://github.com/getredash/redash/pull/1582/files
by adding these steps to Dockerfile.
they are indeed there, but still need to by ran manually to pass the first Error[2] and get to the next one

TL;DR: How can I get a version of 8.0.2 running? thanks