Grocy

Installation

mkdir /var/www/grocy
cd /var/www/grocy
wget (lien de la dernière version)
unzip grocy*
cp config-dist.php /data/config.php

Modifier ces valeurs :

Setting('DEFAULT_LOCALE', 'fr');
Setting('CALENDAR_FIRST_DAY_OF_WEEK', '1');
Setting('CURRENCY', 'EUR');

Et ouais on laisse par défaut les “path”.

Ensuite Apache (ou ce que vous voulez) :

sudo apt install apache2 php php-gd php-json php-intl php-mbstring php-sqlite3
sudo nano /etc/apache2/sites-enabled/000-default.conf
sudo a2enmod rewrite
sudo service apache2 restart

Si ce n'est pas 000-default.conf, activer le site…

Contenu du vhost (derrière un proxy donc uniquement en 80) :

<VirtualHost *:80>
        ServerName grocy.mondomaine.org

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/grocy/public

        RewriteEngine On

        <Directory /var/www/grocy/public >
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Contenu sur le proxy, avec nginx cette fois. 10.0.0.10 est l'ip interne du proxy, 10.0.0.30 celle du container. Penser à activer https.

server {
    listen      10.0.0.10:80;
    server_name "grocy.mondomaine.org";

    include     custom/apache_compat.conf;
    include     custom/headers.conf;
    include     custom/acme_http-01.conf;

    return      301 https://grocy.mondomaine.org$request_uri;

server {
    listen      10.0.0.10:443 ssl http2;
    server_name "grocy.mondomaine.org";

    include     custom/apache_compat.conf;
    include     custom/headers_nocsp.conf;
    include     custom/tls.conf;

    ssl_certificate /etc/letsencrypt/live/test2.liev.re/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/test2.liev.re/privkey.pem;

    client_max_body_size    10000M;

    location / {
        proxy_set_header    Host $host;

        proxy_set_header    X-Real-IP $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto $scheme;
        proxy_buffering     off;
        proxy_request_buffering off;
        proxy_pass          http://10.0.0.30/;
    }

 Ce texte est placé sous licence CC0