Skip to content

Instantly share code, notes, and snippets.

View vpkopylov's full-sized avatar

Vladimir Kopylov vpkopylov

  • CIAN
  • Russia
View GitHub Profile
@vpkopylov
vpkopylov / FireflyIII-in-docker-with-https.md
Last active April 21, 2024 20:21 — forked from optimistic5/FireflyIII-in-10-min.md
How to setup Firefly III in docker with https support (using NGINX and let's encrypt)

This gist is based on another one but it's slightly restructured for better readability. Also docker-compose config is simplified and to avoid breaking changes the specific version (version 6) of Firefly is used.

Prerequisites

  1. VPS/server with any modern OS that supports docker
  2. A domain name with A record pointed to this server
  3. Ports 80 and 443 allowed in firewall

Nginx setup

First we will setup Nginx and ssl certs and next Firefly itself. We put nginx and firefly configs in separate folders to isolate private services, and because nginx can potentially be used to proxy other services. External nginx-proxy network is created to connect Firefly and Nginx containers.

diff --git a/app/functions/fn.cart.php b/app/functions/fn.cart.php
index d1c1535..42e640e 100644
--- a/app/functions/fn.cart.php
+++ b/app/functions/fn.cart.php
@@ -1532,6 +1532,11 @@ function fn_save_cart_content(&$cart, $user_id, $type = 'C', $user_type = 'R')
if (!empty($cart['products']) && is_array($cart['products'])) {
$_cart_prods = $cart['products'];
foreach ($_cart_prods as $_item_id => $_prod) {
+ //FIXME This is a workaround. See @1-17222 for details.
+ if (empty($_cart_prods[$_item_id]['order_id'])) {