yegle / fava-docker

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

Fava not starting. #5

Closed grostim closed 3 years ago

grostim commented 4 years ago

Hi!

I think i am missing something obvious, but you may be able to help me. I am trying to start your container using a docker-compose file:

Here is my docker-compose.yml file:

## This docker-compose file is designed to be used as a template in portainer.
##
## This template can be set up in your portainer "App template".
## Don't forget to set the following environment variables:
## - DOMAIN => your DNS domainname ( example.com )
## - OAUTH2_PROXY_CLIENT_ID => please see https://github.com/bitly/oauth2_proxy
## - OAUTH2_PROXY_CLIENT_SECRET => please see https://github.com/bitly/oauth2_proxy
## - OAUTH2_PROXY_COOKIE_SECRET => Some random long string

version: "3.0"

services:
  fava:
    image: yegle/fava:latest
    volumes:
      - /var/data/volumes/fava:/myData
    environment:
     - BEANCOUNT_FILE=/myData/test.beancount
    networks:
        - internal

  fava-proxy:
    image: a5huynh/oauth2_proxy
    networks:
      - internal
      - traefik_public
    deploy:
      labels:
        - traefik.frontend.rule=Host:fava.$DOMAIN
        - traefik.docker.network=traefik_public
        - traefik.port=4180
    volumes:
      - /var/data/volumes/authenticated-emails.txt:/authenticated-emails.txt
    command: |
      -cookie-secure=false
      -upstream=http://fava:5000
      -redirect-url=https://fava.$DOMAIN
      -http-address=http://0.0.0.0:4180
      -email-domain=$DOMAIN
      -provider=google
      -authenticated-emails-file=/authenticated-emails.txt
    environment:
      - OAUTH2_PROXY_CLIENT_ID=$OAUTH2_PROXY_CLIENT_ID
      - OAUTH2_PROXY_CLIENT_SECRET=$OAUTH2_PROXY_CLIENT_SECRET
      - OAUTH2_PROXY_COOKIE_SECRET=$OAUTH2_PROXY_COOKIE_SECRET

networks:
  traefik_public:
    external: true
  internal:
    driver: overlay
    ipam:
      config:
        - subnet: 172.16.2.0/24

As you can see the part related strictly to the fava container is pretty straightforward. Unfortunately, the fava container does not start and close immediately at start up with the following error:


Error: No file specified```

I guess, the BEANCOUNT FILE environment is not passed to the command line . Is there something i have missed ?
yegle commented 4 years ago

At least the image works by running from command line:

$ docker run --rm -it -e BEANCOUNT_FILE=/test/example.bean -v $PWD:/test yegle/fava
Running Fava on http://0.0.0.0:5000
^CKeyboard Interrupt: shutting down

Aborted!
yegle commented 4 years ago

It looks like I can't reproduce your issue with docker-compose either. Can you do a docker-compose pull and see if you can still reproduce the problem with the latest image?

grostim commented 4 years ago

hi. Thanks, The image is already up to date

yegle commented 4 years ago

@grostim

Can you try something like docker run --rm -it -e BEANCOUNT_FILE=/test/example.bean -v $PWD:/test yegle/fava and see if it works?

yegle commented 3 years ago

Inactive for too long, close.

MickMorley commented 3 years ago

Hi @grostim what was the resolution for this? I am getting the same error.

Error: No file specified

Also, I am getting a different error on your fork.

Error: no such option: -c
MickMorley commented 3 years ago

Hi @grostim,

it looks like your container is using BEANCOUNT_INPUT_FILE variable and @yegle is using BEANCOUNT_FILE.

Once I switched to BEANCOUNT_FILE I got @yegle's docker container working. But yours is still having the error below. I am not sure what's trying to call -c