spiral-project / ihatemoney

A simple shared budget manager web application
https://ihatemoney.org
Other
1.21k stars 270 forks source link

Internal Server Error: with the ADMIN_PASSWORD hash and docker compose #1325

Closed kelvinauta closed 2 months ago

kelvinauta commented 2 months ago

Description

When using docker compose, it seems that "ADMIN_PASSWORD" cannot be used because the "$" character in the ADMIN_PASSWORD hash cannot be properly scoped. Even when the docker compose scope is successfully set, ihatemoney does not seem to recognize this scope correctly.

Problem Reproduction

version: "3.9"

services:
  ihatemoney:
    image: ihatemoney/ihatemoney:latest
    container_name: ihatemoney
    environment:
      - ACTIVATE_ADMIN_DASHBOARD=True
      - ADMIN_PASSWORD= "pbkdf2:sha256:260000$hdbWxovTDO877ElH$e6817cc068d07455c7182a085af7930f572f6d2efa7ca02c49bde8b60cc7af14"
    volumes:
      - ./database:/database
    ports:
      - "8000:8000"

Solution:

The only way I was able to solve it was to use the normal docker run command with single quotes, but I have not managed to make it work with docker compose.

almet commented 2 months ago

Heya.

It seems you can use a double $$ sign, which will be evaluated to a single one.

Because this is not a limitation of ihatemoney, I'm taking the liberty to close the issue here.

Hope you have a fun journey on this :+1: