From 2e9d5d71a0db083546904eb816db1ab5d2787fd1 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 12 Jun 2020 15:50:15 +0200 Subject: [PATCH] services: add Fava --- docker-compose.yml | 12 +++++++ fava/fava.env | 1 + .../nginx/proxy-confs/fava.subdomain.conf | 33 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 fava/fava.env create mode 100644 letsencrypt/nginx/proxy-confs/fava.subdomain.conf diff --git a/docker-compose.yml b/docker-compose.yml index cbb49eb..f06d14b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -314,3 +314,15 @@ services: ports: - 22000:22000 - 21027:21027/udp + + fava: + image: yegle/fava + restart: unless-stopped + container_name: fava + env_file: + - ./fava/fava.env + volumes: + - ~/fava:/bean + expose: + - 5000 + user: 1000:1000 diff --git a/fava/fava.env b/fava/fava.env new file mode 100644 index 0000000..c980eff --- /dev/null +++ b/fava/fava.env @@ -0,0 +1 @@ +BEANCOUNT_FILE=/bean/finances.bean diff --git a/letsencrypt/nginx/proxy-confs/fava.subdomain.conf b/letsencrypt/nginx/proxy-confs/fava.subdomain.conf new file mode 100644 index 0000000..7d204ba --- /dev/null +++ b/letsencrypt/nginx/proxy-confs/fava.subdomain.conf @@ -0,0 +1,33 @@ +# make sure that your dns has a cname set for fava and that your fava container is not using a base url + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name fava.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth, fill in ldap details in ldap.conf + #include /config/nginx/ldap.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /login; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app fava; + set $upstream_port 5000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } +}