Improve docker-compose file: admin password and volume for database

Fixes: #1169
This commit is contained in:
Baptiste Jonglez 2023-07-13 17:54:01 +02:00 committed by zorun
parent 7ef954eaad
commit c681fcd4c9

View file

@ -1,4 +1,14 @@
# This is an example. Please change the configuration variables listed here. # This is an example. Please change the configuration variables listed here.
#
# This example uses a volume to persist the sqlite database outside of the container,
# please adapt the local path. If you use a custom PUID and PGID, you need to create
# the local path beforehand with the correct user/group.
#
# You can generate an admin password with: docker run -it --rm --entrypoint ihatemoney ihatemoney/ihatemoney:latest generate_password_hash
# IMPORTANT: replace every dollar character in the result with a double dollar ($ -> $$)
# To disable admin access, simply set the password to an empty string (ADMIN_PASSWORD=)
#
# See https://ihatemoney.readthedocs.io/en/latest/configuration.html to understand all settings.
version: "3.9" version: "3.9"
@ -7,8 +17,8 @@ services:
image: ihatemoney/ihatemoney:latest image: ihatemoney/ihatemoney:latest
environment: environment:
- DEBUG=False - DEBUG=False
- ACTIVATE_ADMIN_DASHBOARD=False
- ACTIVATE_DEMO_PROJECT=True - ACTIVATE_DEMO_PROJECT=True
- ACTIVATE_ADMIN_DASHBOARD=False
- ADMIN_PASSWORD= - ADMIN_PASSWORD=
- ALLOW_PUBLIC_PROJECT_CREATION=True - ALLOW_PUBLIC_PROJECT_CREATION=True
- BABEL_DEFAULT_TIMEZONE=UTC - BABEL_DEFAULT_TIMEZONE=UTC
@ -30,5 +40,7 @@ services:
- PORT=8000 - PORT=8000
- PUID=0 - PUID=0
- PGID=0 - PGID=0
volumes:
- /path/to/local/dir/for/sqlite/db:/database
ports: ports:
- "8000:8000" - "8000:8000"