yegle / fava-docker

A Dockerfile for beancount-fava
MIT License
91 stars 45 forks source link

Fava in Docker Image - /static/gen CSS and JS not found #1

Closed shmcgrath closed 7 years ago

shmcgrath commented 7 years ago

Hey!

Not really sure if this is the right place for this, but figured I'd reach out to you.

I am using your Dockerfile to make a container for Fava. The end result is a webhost that is missing the CSS and JS from /static/gen. Any tips for me to make that work? I am 99% sure I am doing something wrong, but I am not sure what.

I built the Dockerfile exactly as it is on the repo and called it "fava."

To run the container, I ran the following docker run:

sudo docker run -d --name="fava" --net=host -v /home/shmcg/Dropbox/Beancount/:/beancount -e BEANCOUNT_INPUT_FILE="beancount/shm.beancount" fava

I have the host up at port 5000. I can see the shm.beancount file. But all that is there are the numbers. I attached an image below.

I have remade the container a couple of times. Is my mount point the problem? What is the best way to set up the variable for BEANCOUNT_INPUT_FILE?

Any tips would be greatly appreciated!

What my Chrome with dev tools looks like.

yegle commented 7 years ago

It's likely something changed in fava's Makefile and the minimized JS file are not installed at the right location. I'll take a look today and try to fix that. Thanks for trying out the Dockerfile :-)

yegle commented 7 years ago

Hmm, I'm not sure what went wrong. I just updated the image at hub.docker.com with exactly the same Dockerfile, and my fava instance works just fine.

shmcgrath commented 7 years ago

Awesome. Thanks for checking into it. I will go from the image at hub.docker.com and see if that fixes things!

Update: it did not. Thanks for taking a look. I appreciate the help. I will try and figure out where I am going wrong. Maybe my mount directory?

shmcgrath commented 7 years ago

I may have found the issue. In line 17 of the dockerfile hub.docker.com and in this repo, it states:

        && make -C fava clean \

The most recent one on the fava repo states:

        && make -C fava mostlyclean \

It looks like that change was made so that "app.js" still exists. Changing that line fixed my issue! Thank you again for all of the help!

yegle commented 7 years ago

Hmm, looks like the Dockerfile in the official repo is more up-to-date. I'd suggest you to use that file instead.