{"id":20346645,"url":"https://github.com/arthurfdlr/fava-service","last_synced_at":"2025-03-04T15:47:43.922Z","repository":{"id":192962194,"uuid":"687821719","full_name":"ArthurFDLR/fava-service","owner":"ArthurFDLR","description":"💸 Deploy Beancount Fava as a Docker service with authentication, dark theme, and auto refresh","archived":false,"fork":false,"pushed_at":"2023-09-07T15:46:01.000Z","size":87,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T22:31:37.993Z","etag":null,"topics":["beancount","docker","ledger","plaintext-accounting"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArthurFDLR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T04:38:20.000Z","updated_at":"2025-01-01T20:31:54.000Z","dependencies_parsed_at":"2024-11-14T22:13:48.332Z","dependency_job_id":null,"html_url":"https://github.com/ArthurFDLR/fava-service","commit_stats":null,"previous_names":["arthurfdlr/fava-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Ffava-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Ffava-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Ffava-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Ffava-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArthurFDLR","download_url":"https://codeload.github.com/ArthurFDLR/fava-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241877418,"owners_count":20035403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beancount","docker","ledger","plaintext-accounting"],"created_at":"2024-11-14T22:13:42.584Z","updated_at":"2025-03-04T15:47:43.889Z","avatar_url":"https://github.com/ArthurFDLR.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align = \"center\"\u003e Beancount Fava Docker Service \u003c/h1\u003e\n\nDeploy [Beancount Fava](https://github.com/beancount/fava) as a Docker service, including:\n - Automatic refresh of your Ledger hosted on a Git repository;\n - [Nginx](https://www.nginx.com/) reverse proxy with [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication);\n - [Nord Theme](https://www.nordtheme.com/) for Fava;\n\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/ArthurFDLR/fava-service/blob/main/.github/nord-theme.png?raw=true\" alt=\"Banner\" width=\"100%\" style=\"border-radius: 5px;\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n### Build the Docker image\n\n1. Set the port for the Fava service in the [`nginx.conf`](./nginx.conf) file (`80` by default):\n    ```nginx.conf\n    ...\n        server {\n            listen 80;\n    ...\n    ```\n\n2. Set new credentials (User: `admin` \u0026 Password: `admin` by default):\n    ```sh\n    htpasswd -c .htpasswd \u003cuser\u003e\n    ```\n    \u003e **Note:** Install `apache2-utils` if you don't have `htpasswd`.\n\n3. Set the refresh rate of the Ledger (i.e. `pull` your repository) as a Cron schedule in the [`Dockerfile`](./Dockerfile) file (`0 * * * *` by default).\n\n4. [Optional] Customize the Fava theme by editing the [`style.css`](./style.css) file ([Nord Theme](https://www.nordtheme.com/) by default). Or, if you want to use the default Fava theme, comment the following line in the [`Dockerfile`](./Dockerfile) file:\n    ```Dockerfile\n    # Comment the following line to use the default Fava theme\n    COPY ./style.css ./fava/frontend/css/style.css\n    ```\n\n5. Build the Docker image:\n    ```sh\n    docker build -t fava-service .\n    ```\n\n    \u003e **Note:** You can change the name of the image (`fava-service`) to whatever you want.\n\n### Run the Docker container\n\n1. Set the URL to your Ledger repository as (1.) an environment variable, **OR** (2.) a Docker secret:\n   1. Set `REPOSITORY_URL` to the URL of your Ledger repository in [`example/user.conf`](./example/user.conf):\n        ```sh\n        echo \"REPOSITORY_URL=https://git.server/ledger.git\" \u003e\u003e ./example/user.conf\n        ```\n   2. Update [`example/ledger-git`](`./example/ledger-git`) to use the URL of your Ledger repository:\n        ```sh\n        echo -n \"https://\u003cuser\u003e:\u003cpassword\u003e@git.server/ledger.git\" \u003e ./example/ledger-git\n        ```\n    \u003e **Note:** The environment variable `REPOSITORY_URL` has priority over the Docker secret `ledger-git` if both are set.\n\n2. Set `BEAN_FILE` to the path of your main Beancount file in your Ledger repository in [`example/user.conf`](./example/user.conf). Do not use trailing slashes. For example:\n    ```sh\n    echo \"BEAN_FILE=main.beancount\" \u003e\u003e ./example/user.conf\n    echo \"BEAN_FILE=my-ledger/main.beancount\" \u003e\u003e ./example/user.conf\n    ```\n\n3. Start the Docker service:\n    ```sh\n    docker compose -f example/docker-compose.yml up\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurfdlr%2Ffava-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurfdlr%2Ffava-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurfdlr%2Ffava-service/lists"}