Failing to load CSS and scripts

36 views
Skip to first unread message

Andres Reloir

unread,
Oct 18, 2023, 4:37:02 PM10/18/23
to Review Board Community
Hi,

I just tried to setup Reviewboard with Docker, but the CSS and other resources are failing to load. I tried using only Traefik. Then tried the same setup with Nginx with Traefik routed to it (unsure if this is supposed to be done this way)

I don't see any unusual logs in Docker.

reviewboard-reviewboard-1  | 2023-10-18 20:32:02,679 - DEBUG -  - root - Logging to /site/logs/reviewboard.log with a minimum level of DEBUG
reviewboard-reviewboard-1  | 2023-10-18 20:32:03,108 - DEBUG -  - /venv/lib/python3.11/site-packages/rbpowerpack/scmtools/versionvault.pyc - Using cleartool cleartool
reviewboard-reviewboard-1  | 2023-10-18 20:32:03,212 - DEBUG -  - reviewboard.scmtools.svn - Using reviewboard.scmtools.svn.pysvn backend for SVN
reviewboard-reviewboard-1  | 2023-10-18 20:32:03,408 - DEBUG -  - reviewboard.scmtools.clearcase - Using cleartool cleartool
reviewboard-reviewboard-1  | 2023-10-18 20:32:03,425 - DEBUG -  - root - Reloading logging settings
reviewboard-reviewboard-1  | 2023-10-18 20:32:03,425 - DEBUG -  - root - Logging to /site/logs/reviewboard.log with a minimum level of DEBUG

Screenshot_20231018_223636.png



Christian Hammond

unread,
Oct 23, 2023, 8:33:50 PM10/23/23
to revie...@googlegroups.com
Hi Andres,

The Review Board Docker image only provides the backend web server, which does not serve up CSS, JavaScript, images, or other static media. It does need a server like Nginx or Apache in front of it for handling that (and these can then load balance across multiple Review Board servers as needed).

The Nginx server needs to be set up to serve the static contents and forward everything else to Review Board.

You can see our sample Nginx configuration and a working docker-compose configuration here:

Hope that points you in the right direction!

Christian

--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board


--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/692fbf37-39b0-477d-a1ec-09f37439844an%40googlegroups.com.

Andres Reloir

unread,
Oct 24, 2023, 9:00:08 AM10/24/23
to Review Board Community
Hi Christian,

Yup I've set up a Nginx container for this. I may be doing something wrong with my Traefik config then perhaps.
I changed the volumes to be relative to my docker compose, but surely there's no mistake in here right? Did I have to edit the default.conf.template as well?

  reviewboard:
    image: beanbag/reviewboard:latest
    depends_on:
      - db
      - memcached
    environment:
      - DATABASE_TYPE=mysql
      - .... other environment stuff
    volumes:
      - ./sitedir:/site

  nginx:
    image: nginx:alpine
    restart: always
    depends_on:
      - reviewboard
    environment:
      - NGINX_HOST=xxxxx
      - NGINX_PORT=80
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.reviewboard.rule=Host(`xxxxxx`)"
        - "traefik.http.routers.reviewboard.entrypoints=web,websecure"
        - "traefik.http.routers.reviewboard.tls=true"
        - "traefik.http.routers.reviewboard.tls.certresolver=letsencrypt"
    volumes:
      - ./sitedir:/var/www/reviewboard
      - ./nginx_templates:/etc/nginx/templates

Christian Hammond

unread,
Oct 25, 2023, 11:32:00 PM10/25/23
to revie...@googlegroups.com
It looks like it should be fine. Can you verify that the site directory's htdocs/static/rb/css/ exists and has files in it?

If you've made changes to the Nginx setup at all, you might want to try removing the Nginx volume and re-creating it so it can try re-applying any templates, just to check.

Christian

Reply all
Reply to author
Forward
0 new messages