GithubHelp home page GithubHelp logo

docker-babybuddy's Introduction

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build LSIO CI

Babybuddy is a buddy for babies! Helps caregivers track sleep, feedings, diaper changes, tummy time and more to learn about and predict baby's needs without (as much) guess work.

babybuddy

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/babybuddy:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf

Application Setup

Access the webui at <your-ip>:8000 (or whichever host port is mapped in docker arguments). The default user/pass are admin:admin.

By default BabyBuddy uses sqlite3. To use an external database like postgresql or mysql/mariadb instead, you can use the environment variables listed in BabyBuddy docs.

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

docker-compose (recommended, click here for more info)

---
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy:latest
    container_name: babybuddy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,https://babybuddy.domain.com
    volumes:
      - /path/to/babybuddy/config:/config
    ports:
      - 8000:8000
    restart: unless-stopped
docker run -d \
  --name=babybuddy \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,https://babybuddy.domain.com \
  -p 8000:8000 \
  -v /path/to/babybuddy/config:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/babybuddy:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
-p 8000 the port for the web ui
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=Etc/UTC specify a timezone to use, see this list.
-e CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,https://babybuddy.domain.com Add any address you'd like to access babybuddy at (comma separated, no spaces)
-v /config Persistent config files

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

User / Group Identifiers

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:

id your_user

Example output:

uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:

    docker exec -it babybuddy /bin/bash
  • To monitor the logs of the container in realtime:

    docker logs -f babybuddy
  • Container version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' babybuddy
  • Image version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/babybuddy:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      docker-compose pull
    • Single image:

      docker-compose pull babybuddy
  • Update containers:

    • All containers:

      docker-compose up -d
    • Single container:

      docker-compose up -d babybuddy
  • You can also remove the old dangling images:

    docker image prune

Via Docker Run

  • Update the image:

    docker pull lscr.io/linuxserver/babybuddy:latest
  • Stop the running container:

    docker stop babybuddy
  • Delete the container:

    docker rm babybuddy
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    docker image prune

Image Update Notifications - Diun (Docker Image Update Notifier)

tip: We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-babybuddy.git
cd docker-babybuddy
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/babybuddy:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 30.06.24: - Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings.
  • 23.12.23: - Rebase to Alpine 3.19 with php 8.3.
  • 05.07.23: - Add standard HTTP/HTTPS listen ports 80 and 443, keeping 8000 for backwards compatibility.
  • 25.05.23: - Rebase to Alpine 3.18, deprecate armhf.
  • 16.01.23: - Rebase to Alpine 3.17.
  • 23.11.22: - Rebase to Alpine 3.16, migrate to s6v3. Restructure nginx configs (see changes announcement).
  • 28.05.22: - Add missing PUID/PGID vars to readme.
  • 03.04.22: - Rebase to alpine-nginx baseimage. Add CSRF_TRUSTED_ORIGINS env var.
  • 11.12.21: - Add py3-mysqlclient for mysql/mariadb.
  • 14.11.21: - Add lxml dependencies (temp fix for amd64 by force compiling lxml).
  • 25.07.21: - Add libpq for postgresql.
  • 08.07.21: - Fix pip install issue.
  • 05.07.21: - Update Gunicorn parameters to prevent WORKER_TIMEOUT issue.
  • 22.06.21: - Initial release.

docker-babybuddy's People

Contributors

aptalca avatar cdubz avatar j0nnymoe avatar jcgoette avatar kdrobnyh avatar linuxserver-ci avatar nemchik avatar roxedus avatar thespad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-babybuddy's Issues

InvalidTemplateLibrary

linuxserver.io


Expected Behavior

Working app

Current Behavior

After redeploying 1.9.1 I get this not working page.
I removed all data, fresh container.

Steps to Reproduce

docker run -d \ --name=babybuddy \ --net=baby \ --ip=172.22.0.2 \ -e TZ=Europe/Amsterdam \ -p 8001:8000 \ -v babybuddy:/config \ --restart unless-stopped \ ghcr.io/linuxserver/babybuddy:latest

Environment

Debian 11.1
x86_64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

Docker logs

from svglib.svglib import svg2rlg, File "/usr/lib/python3.9/site-packages/svglib/svglib.py", line 39, in <module>, from lxml import etree, ImportError: cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/__init__.py), , The above exception was the direct cause of the following exception:, , Traceback (most recent call last):, File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner, response = get_response(request), File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 204, in _get_response, response = response.render(), File "/usr/lib/python3.9/site-packages/django/template/response.py", line 105, in render, self.content = self.rendered_content, File "/usr/lib/python3.9/site-packages/django/template/response.py", line 81, in rendered_content, template = self.resolve_template(self.template_name), File "/usr/lib/python3.9/site-packages/django/template/response.py", line 63, in resolve_template, return select_template(template, using=self.using), File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 38, in select_template, engines = _engine_list(using), File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 66, in _engine_list, return engines.all() if using is None else [engines[using]], File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 90, in all, return [self[alias] for alias in self], File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 90, in <listcomp>, return [self[alias] for alias in self], File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 81, in __getitem__, engine = engine_cls(params), File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 25, in __init__, options['libraries'] = self.get_templatetag_libraries(libraries), File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries, libraries = get_installed_libraries(), File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries, for name in get_package_libraries(pkg):, File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 123, in get_package_libraries, raise InvalidTemplateLibrary(, django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'easy_thumbnails.templatetags.easy_thumbnails_tags': cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/__init__.py), Internal Server Error: /login/, Traceback (most recent call last):, File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 66, in __getitem__, return self._engines[alias], KeyError: 'django', , During handling of the above exception, another exception occurred:, , Traceback (most recent call last):, File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 121, in get_package_libraries, module = import_module(entry[1]), File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module, return _bootstrap._gcd_import(name[level:], package, level), File "<frozen importlib._bootstrap>", line 1030, in _gcd_import, File "<frozen importlib._bootstrap>", line 1007, in _find_and_load, File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked, File "<frozen importlib._bootstrap>", line 680, in _load_unlocked, File "<frozen importlib._bootstrap_external>", line 855, in exec_module, File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed, File "/usr/lib/python3.9/site-packages/easy_thumbnails/templatetags/easy_thumbnails_tags.py", line 8, in <module>, from .thumbnail import *, File "/usr/lib/python3.9/site-packages/easy_thumbnails/templatetags/thumbnail.py", line 12, in <module>, from easy_thumbnails.files import get_thumbnailer, File "/usr/lib/python3.9/site-packages/easy_thumbnails/files.py", line 17, in <module>, from easy_thumbnails.VIL.Image import load, File "/usr/lib/python3.9/site-packages/easy_thumbnails/VIL/Image.py", line 10, in <module>, from svglib.svglib import svg2rlg, File "/usr/lib/python3.9/site-packages/svglib/svglib.py", line 39, in <module>, from lxml import etree, ImportError: cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/__init__.py), , The above exception was the direct cause of the following exception:, , Traceback (most recent call last):, File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner, response = get_response(request), File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 204, in _get_response, response = response.render(), File "/usr/lib/python3.9/site-packages/django/template/response.py", line 105, in render, self.content = self.rendered_content, File "/usr/lib/python3.9/site-packages/django/template/response.py", line 81, in rendered_content, template = self.resolve_template(self.template_name), File "/usr/lib/python3.9/site-packages/django/template/response.py", line 63, in resolve_template, return select_template(template, using=self.using), File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 38, in select_template, engines = _engine_list(using), File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 66, in _engine_list, return engines.all() if using is None else [engines[using]], File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 90, in all, return [self[alias] for alias in self], File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 90, in <listcomp>, return [self[alias] for alias in self], File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 81, in __getitem__, engine = engine_cls(params), File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 25, in __init__, options['libraries'] = self.get_templatetag_libraries(libraries), File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries, libraries = get_installed_libraries(), File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries, for name in get_package_libraries(pkg):, File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 123, in get_package_libraries, raise InvalidTemplateLibrary(, django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'easy_thumbnails.templatetags.easy_thumbnails_tags': cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/__init__.py)
`Environment:

Request Method: GET
Request URL: http://192.168.2.242:8001/login/?next=/

Django Version: 3.2.9
Python Version: 3.9.5
Installed Applications:
['api',
'babybuddy',
'core',
'dashboard',
'reports',
'axes',
'django_filters',
'rest_framework',
'rest_framework.authtoken',
'widget_tweaks',
'easy_thumbnails',
'storages',
'import_export',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'babybuddy.middleware.RollingSessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'babybuddy.middleware.UserTimezoneMiddleware',
'django.middleware.locale.LocaleMiddleware',
'babybuddy.middleware.UserLanguageMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'axes.middleware.AxesMiddleware']

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 66, in getitem
return self._engines[alias]

During handling of the above exception ('django'), another exception occurred:
File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import

File "", line 1007, in _find_and_load

File "", line 986, in _find_and_load_unlocked

File "", line 680, in _load_unlocked

File "", line 855, in exec_module

File "", line 228, in _call_with_frames_removed

File "/usr/lib/python3.9/site-packages/easy_thumbnails/templatetags/easy_thumbnails_tags.py", line 8, in
from .thumbnail import *
File "/usr/lib/python3.9/site-packages/easy_thumbnails/templatetags/thumbnail.py", line 12, in
from easy_thumbnails.files import get_thumbnailer
File "/usr/lib/python3.9/site-packages/easy_thumbnails/files.py", line 17, in
from easy_thumbnails.VIL.Image import load
File "/usr/lib/python3.9/site-packages/easy_thumbnails/VIL/Image.py", line 10, in
from svglib.svglib import svg2rlg
File "/usr/lib/python3.9/site-packages/svglib/svglib.py", line 39, in
from lxml import etree

The above exception (cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/init.py)) was the direct cause of the following exception:
File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 204, in _get_response
response = response.render()
File "/usr/lib/python3.9/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/usr/lib/python3.9/site-packages/django/template/response.py", line 81, in rendered_content
template = self.resolve_template(self.template_name)
File "/usr/lib/python3.9/site-packages/django/template/response.py", line 63, in resolve_template
return select_template(template, using=self.using)
File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 38, in select_template
engines = _engine_list(using)
File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 66, in _engine_list
return engines.all() if using is None else [engines[using]]
File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 90, in
return [self[alias] for alias in self]
File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 81, in getitem
engine = engine_cls(params)
File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 25, in init
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(

Exception Type: InvalidTemplateLibrary at /login/
Exception Value: Invalid template library specified. ImportError raised when trying to load 'easy_thumbnails.templatetags.easy_thumbnails_tags': cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/init.py)
`

Issue running arm32v7-latest Tag on RPI3

linuxserver.io


Expected Behavior

Create a new container running on RPI3 - armv7l & armhf

Current Behavior

Container gets created but UI isn't accessible, logs report issue of writing to a locked database

Steps to Reproduce

  1. Create docker-compose with the below yaml
    2.docker-compose up -d
    3.docker logs -f babybuddy
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy:arm32v7-latest
    container_name: babybuddy
    environment:
      - TZ=Europe/London
    volumes:
      - ./appdata:/config
    ports:
      - 10405:8000
    restart: unless-stopped

Environment

OS: Raspberry OS - Bullseye
CPU architecture: arm32
How docker service was installed: docker-compose

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

Docker logs

Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
**** No secret key found, generating one ****
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, easy_thumbnails, sessions
Running migrations:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
sqlite3.OperationalError: database is locked

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 68, in ensure_schema
    editor.create_model(self.Migration)
  File "/usr/lib/python3.9/site-packages/django/db/backends/sqlite3/schema.py", line 36, in __exit__
    super().__exit__(exc_type, exc_value, traceback)
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 120, in __exit__
    self.atomic.__exit__(exc_type, exc_value, traceback)
  File "/usr/lib/python3.9/site-packages/django/db/transaction.py", line 246, in __exit__
    connection.commit()
  File "/usr/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 266, in commit
    self._commit()
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
  File "/usr/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
django.db.utils.OperationalError: database is locked

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/babybuddy/manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/app/babybuddy/babybuddy/management/commands/migrate.py", line 10, in handle
    super(Command, self).handle(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle
    post_migrate_state = executor.migrate(
  File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 91, in migrate
    self.recorder.ensure_schema()
  File "/usr/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 70, in ensure_schema
    raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked)
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
sqlite3.OperationalError: database is locked

[BUG] Fail to upload child picture, error 500

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I used to be able to upload pictures for the childrens' profile, but as of version 2.0.2 (docker container), uploading photos throws error 500, and no photos are shown in the web app.

When I go to the webapp under [Home] >[Children] > [Joe Doe] > Update , it shows a path for the photo I was trying to upload, despite having thrown an error earlier:

Currently: child/picture/myphoto.jpg

On the server side, that path does correspond to the correct file, but the CACHE folder does not have the file I just uploaded, it only has a folder for an old photo I uploaded before the upgrade.

$  ls media/child/picture/
myphoto.jpg
previousPhoto.jpg

$ ls media/CACHE/images/child/picture/
previousPhoto/previousPhoto.jpg

My compose.yaml looks like this (domain and port are obscured)

version: "2.1"
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy:latest
    container_name: babybuddy
    environment:
      - TZ=EST
      - PUID=1000
      - PGID=1000
      - CSRF_TRUSTED_ORIGINS=http://127.0.0.1:MYPORT,https://MY.DOMAIN.com
      - SECURE_PROXY_SSL_HEADER=True
    volumes:
      - /home/docker_apps/babybuddy:/config
    ports:
      - MYPORT:8000
    restart: unless-stopped

I have an Apache server running in the same machine that proxies requests from https://MY.DOMAIN.com to the babbybuddy docker app. I tested uploading different photos, both within my LAN and outside my LAN and I get the same error.

In the web app, all the the child profile pictures that have a reference url as: https://MY.DOMAIN.com/media/CACHE/images/child/picture/previousPhoto.jpg show the image just fine. But the profiles pictures that have a reference url as: https://MY.DOMAIN.com/children/children_name/ does not show any image.

image

Otherwise babybuddy works without issues.

Expected Behavior

No response

Steps To Reproduce

see above.

Environment

- OS:Ubuntu 20.04

CPU architecture

x86-64

Docker creation

see above

Container logs

using keys found in /config/keys
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, dbsettings, sessions
Running migrations:
  Applying babybuddy.0028_alter_settings_language_alter_settings_timezone... OK
  Applying dbsettings.0001_initial... OK
  Applying core.0026_alter_feeding_end_alter_feeding_start_and_more... OK
  Applying core.0027_alter_timer_options_remove_timer_duration_and_more... OK
  Applying core.0028_alter_sleep_options_remove_sleep_napping_sleep_nap... OK
  Applying core.0029_alter_pumping_options_remove_pumping_time_and_more... OK
Cache table 'cache_default' already exists.
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2022-08-16 │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
│ 2022-11-23 │ 2023-07-05 │ /config/nginx/site-confs/default.conf                                  │
│ 2022-08-20 │ 2023-06-24 │ /config/nginx/ssl.conf                                                 │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[2023-07-14 09:22:11 -0500] [257] [INFO] Starting gunicorn 20.1.0
[2023-07-14 09:22:11 -0500] [257] [INFO] Listening at: http://127.0.0.1:3000 (257)
[2023-07-14 09:22:11 -0500] [257] [INFO] Using worker: gthread
[2023-07-14 09:22:11 -0500] [276] [INFO] Booting worker with pid: 276
[2023-07-14 09:22:11 -0500] [277] [INFO] Booting worker with pid: 277
[ls.io-init] done.

Default Values from cont-init.d Script Not Set

linuxserver.io


Expected Behavior

When running Docker container without any environment variables set, the default values from cont-init.d script should pass through to app, most importantly, DJANGO_SETTINGS_MODULE="babybuddy.settings.base".

DJANGO_SETTINGS_MODULE="babybuddy.settings.base" \
ALLOWED_HOSTS="${ALLOWED_HOSTS:-*}" \
TIME_ZONE="${TZ:-UTC}" \
DEBUG="${DEBUG:-False}" \
SECRET_KEY="${SECRET_KEY:-`cat /config/.secretkey`}"

Current Behavior

They do not pass through - discovered this while trying to run python3 /app/babybuddy/manage.py clearsessions within container and received this error:

No Django settings specified.
Unknown command: 'clearsessions'
Type 'manage.py help' for usage.

Steps to Reproduce

  1. $ docker run or docker-compose up -d without any environment variables set
  2. $ docker exec -it ... /usr/bin/with-contenv bash or /bin/bash
  3. $ export
  4. $ python3 /app/babybuddy/manage.py clearsessions

Environment

OS: Linux and Windows
CPU architecture: x86_64
How docker service was installed: unsure...

Command used to create docker container (run/create/compose/screenshot)

version: "2.1"
services:
babybuddy:
image: ghcr.io/linuxserver/babybuddy
container_name: babybuddy
volumes:
- /path/to/appdata:/config
ports:
- 8000:8000
restart: unless-stopped

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \ 
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 911
User gid: 911

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
**** No secret key found, generating one ****
Operations to perform:
Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, easy_thumbnails, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying authtoken.0001_initial... OK
Applying authtoken.0002_auto_20160226_1747... OK
Applying authtoken.0003_tokenproxy... OK
Applying axes.0001_initial... OK
Applying axes.0002_auto_20151217_2044... OK
Applying axes.0003_auto_20160322_0929... OK
Applying axes.0004_auto_20181024_1538... OK
Applying axes.0005_remove_accessattempt_trusted... OK
Applying axes.0006_remove_accesslog_trusted... OK
Applying babybuddy.0001_initial... OK
Applying babybuddy.0002_add_settings... OK
Applying babybuddy.0003_add_refresh_help_text... OK
Applying babybuddy.0004_settings_language... OK
Applying babybuddy.0005_auto_20190502_1701... OK
Applying babybuddy.0006_auto_20190502_1744... OK
Applying babybuddy.0007_auto_20190607_1422... OK
Applying babybuddy.0008_auto_20200120_0622... OK
Applying babybuddy.0009_settings_timezone... OK
Applying babybuddy.0010_auto_20200609_0649... OK
Applying babybuddy.0011_auto_20200813_0238... OK
Applying babybuddy.0012_auto_20201024_1847... OK
Applying babybuddy.0013_auto_20210411_1241... OK
Applying babybuddy.0014_settings_hide_empty... OK
Applying babybuddy.0015_alter_settings_timezone... OK
Applying babybuddy.0016_alter_settings_timezone... OK
Applying babybuddy.0017_settings_hide_age... OK
Applying core.0001_initial... OK
Applying core.0002_auto_20171028_1257... OK
Applying core.0003_weight... OK
Applying core.0004_child_picture... OK
Applying core.0005_auto_20190416_2048... OK
Applying core.0006_auto_20190502_1701... OK
Applying core.0007_temperature... OK
Applying core.0008_auto_20190607_1422... OK
Applying core.0009_diaperchange_amount... OK
Applying core.0010_timer_child... OK
Applying core.0011_auto_20200214_1939... OK
Applying core.0012_auto_20200813_0238... OK
Applying core.0013_auto_20210415_0528... OK
Applying core.0014_alter_child_slug... OK
Applying easy_thumbnails.0001_initial... OK
Applying easy_thumbnails.0002_thumbnaildimensions... OK
Applying sessions.0001_initial... OK
[cont-init.d] 30-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-08-14 00:28:34 -0400] [294] [INFO] Starting gunicorn 20.1.0
[2021-08-14 00:28:34 -0400] [294] [INFO] Listening at: http://0.0.0.0:8000 (294)
[2021-08-14 00:28:34 -0400] [294] [INFO] Using worker: gthread
[2021-08-14 00:28:34 -0400] [310] [INFO] Booting worker with pid: 310
[2021-08-14 00:28:34 -0400] [311] [INFO] Booting worker with pid: 311

Connection refused with v1.10.2-ls31

linuxserver.io


Expected Behavior

v1.10.2-ls30 works fine, I expected v1.10.2-ls31 to have no breaking changes.

Current Behavior

Attempting to view Baby Buddy with v1.10.2-ls31 results in "connection refused" and nothing else in the logs. Seems like a regression introduced by #17

Steps to Reproduce

  1. Launch Baby Buddy behind Traefik using docker-compose.yml below
  2. Attempt to visit Baby Buddy at https://babybuddy.${LOCALDOMAIN}
  3. Get a 502, Bad Gateway
  4. Check Traefik debug logs, see that the backend refused the connection

There is nothing in the Baby Buddy logs about the refused connection, so I'm not sure how to proceed with debugging.

Environment

OS: Ubuntu
CPU architecture: x86_64
How docker service was installed: snap

docker-composer.yml

version: '3'
services:
  babybuddy:
    # v1.10.2-ls31 is broken, not sure why
    image: linuxserver/babybuddy:v1.10.2-ls31
    container_name: babybuddy
    environment:
      DEBUG: "True"
      TZ: ${TZ}
      CSRF_TRUSTED_ORIGINS: https://babybuddy.${LOCALDOMAIN}
      SECURE_PROXY_SSL_HEADER: "True"
    volumes:
      - ${CONFIGFOLDER}/babybuddy:/config
    networks:
      - web
    labels:
      traefik.enable: true
      traefik.http.routers.babybuddy.entrypoints: web-secure
      traefik.http.routers.babybuddy.middlewares: default@file
      traefik.http.routers.babybuddy.rule: Host(`babybuddy.${LOCALDOMAIN}`)
      traefik.http.routers.babybuddy.tls.certResolver: primary
    restart: ${RESTARTPOLICY}

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-config: executing...
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, sessions
Running migrations:
  No migrations to apply.
  Your models in app(s): 'babybuddy' have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Cache table 'cache_default' already exists.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-04-06 10:59:00 -0700] [376] [INFO] Starting gunicorn 20.1.0
[2022-04-06 10:59:00 -0700] [376] [INFO] Listening at: http://127.0.0.1:3000 (376)
[2022-04-06 10:59:00 -0700] [376] [INFO] Using worker: gthread
[2022-04-06 10:59:00 -0700] [404] [INFO] Booting worker with pid: 404
[2022-04-06 10:59:00 -0700] [405] [INFO] Booting worker with pid: 405

Unable to login with default information + image uploads fail

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After first pulling & brining up the container, I am unable to log into the application with the default admin/admin password.

To fix this I can do a chmod -R 777 on the config directory and then I’m able to log in.

Then, when trying to add a child, if I add a picture (with debug enabled) I get the error module 'PIL.Image' has no attribute 'ANTIALIAS'

A little more info on this bug raised here:
babybuddy/babybuddy#684

Expected Behavior

Able to log in with default username and password

Able to upload a picture of the child

Steps To Reproduce

  1. Pull & start the latest image - Linuxserver.io version:- v2.0.2-ls95 Build-date:- 2023-07-17T14:43:50+00:00
  2. Got to the website/application
  3. Try to log in with admin / admin - This will error
  4. Chmod the configuration directory 777
  5. Attempt to login again
  6. In the application: Add child with name & picture - This will error

Environment

- OS: Ubuntu
- How docker service was installed: Docker installed via apt-get

Docker version: 24.0.4, build 3713ee1
Ubuntu version: 20.04.6 LTS

CPU architecture

x86-64

Docker creation

version: '2.1'

services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy
    container_name: babybuddy
    environment:
      - TZ=Europe/London
      - PUID=981
      - PGID=981
      - DEBUG=1
    volumes:
      - ./config:/config
    ports:
      - 8000:8000
    restart: unless-stopped

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    981
User GID:    981
───────────────────────────────────────

using keys found in /config/keys
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, dbsettings, sessions
Running migrations:
  No migrations to apply.
Cache table 'cache_default' already exists.
[custom-init] No custom files found, skipping...
[ls.io-init] done.

[BUG] /config/data symbolic link not getting set correctly

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

OperationalError at /login/

attempt to write a readonly database
Request Method: | POST

https://baby.domain.ext/login/
4.1.6
OperationalError
attempt to write a readonly database

When checking inside the container I find that the symbolic link is being created at /app/www/public/data/data

root@4e7f0f2172e2:/app/www/public# ls -l
total 791
-rw-rw-r--  1 root root  66044 Mar 18 14:02 CHANGELOG.md
-rw-rw-r--  1 root root   1337 Mar 18 14:02 LICENSE
-rw-rw-r--  1 root root    600 Mar 18 14:02 Pipfile
-rw-rw-r--  1 root root     21 Mar 18 14:02 Procfile
-rw-rw-r--  1 root root    134 Mar 18 14:02 Procfile.sh
-rw-rw-r--  1 root root   4479 Mar 18 14:02 README.md
-rw-rw-r--  1 root root    559 Mar 18 14:02 SECURITY.md
drwxrwxr-x  1 root root      4 Apr 13 09:56 api
drwxrwxr-x  1 root root      7 Apr 13 09:56 babybuddy
drwxrwxr-x  2 root root      4 Apr  9 17:20 bin
drwxrwxr-x  1 root root      5 Apr 13 09:56 core
drwxrwxr-x  1 root root      5 Apr 13 09:56 dashboard
drwxrwxr-x  1 root root      5 Apr 13 09:56 data
drwxrwxr-x  8 root root     13 Apr  9 17:20 docs
drwxrwxr-x  2 root root      4 Apr  9 17:20 etc
-rw-rw-r--  1 root root   4217 Mar 18 14:02 gulpfile.config.js
-rw-rw-r--  1 root root   9689 Mar 18 14:02 gulpfile.js
drwxrwxr-x 19 root root     19 Apr  9 17:20 locale
-rwxrwxr-x  1 root root    893 Mar 18 14:02 manage.py
lrwxrwxrwx  1 root root     13 Apr 13 09:56 media -> /config/media
-rw-rw-r--  1 root root   1294 Mar 18 14:02 mkdocs.yml
-rw-rw-r--  1 root root 109929 Mar 18 14:02 openapi-schema.yml
-rw-rw-r--  1 root root 729449 Mar 18 14:02 package-lock.json
-rw-rw-r--  1 root root   1104 Mar 18 14:02 package.json
drwxrwxr-x  1 root root      5 Apr 13 09:56 reports
-rw-rw-r--  1 root root   1712 Mar 18 14:02 requirements.txt
-rw-rw-r--  1 root root     14 Mar 18 14:02 runtime.txt
-rw-rw-r--  1 root root 147658 Mar 18 14:02 screenshot.png
-rw-rw-r--  1 root root 211727 Mar 18 14:02 screenshot_mobile.png
drwxrwxr-x  6 root root      7 Apr  9 17:20 static

root@4e7f0f2172e2:/app/www/public/data# ls -l
total 29
lrwxrwxrwx 1 root root     12 Apr 13 09:56 data -> /config/data
-rw-r--r-- 1 root root 385024 Apr 13 09:56 db.sqlite3

Because the symoblic link isn't in the right place the permissions setting in the 's6-rc.d/init-babybuddy-config/run' isn't being performed on the folder and the database isn't writable.

When the permissions were changed within the container then login worked. When container is restarted (with docker-compose) it no longer worked again.

Expected Behavior

The symbolic link should be at /app/www/public/data so that the database is writable.

Steps To Reproduce

  1. docker-compose up -d
  2. navigate to http://:8000
  3. login with default user/pass

Environment

- OS: Debian 11
- How docker service was installed: https://docs.docker.com/engine/install/debian/

CPU architecture

x86-64

Docker creation

---
version: "2.1"
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy:latest
    container_name: babybuddy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Detroit
      - SECRET_KEY=<Secret Key>
      - DEBUG=True
    volumes:
      - /mnt/<drive>/runtime/babybuddy/appdata:/config
    ports:
      - 8000:8000
    restart: unless-stopped`


### Container logs

```bash
# docker logs babybuddy 
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
using keys found in /config/keys
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying authtoken.0001_initial... OK
  Applying authtoken.0002_auto_20160226_1747... OK
  Applying authtoken.0003_tokenproxy... OK
  Applying axes.0001_initial... OK
  Applying axes.0002_auto_20151217_2044... OK
  Applying axes.0003_auto_20160322_0929... OK
  Applying axes.0004_auto_20181024_1538... OK
  Applying axes.0005_remove_accessattempt_trusted... OK
  Applying axes.0006_remove_accesslog_trusted... OK
  Applying axes.0007_alter_accessattempt_unique_together... OK
  Applying axes.0008_accessfailurelog... OK
  Applying babybuddy.0001_initial... OK
  Applying babybuddy.0002_add_settings... OK
  Applying babybuddy.0003_add_refresh_help_text... OK
  Applying babybuddy.0004_settings_language... OK
  Applying babybuddy.0005_auto_20190502_1701... OK
  Applying babybuddy.0006_auto_20190502_1744... OK
  Applying babybuddy.0007_auto_20190607_1422... OK
  Applying babybuddy.0008_auto_20200120_0622... OK
  Applying babybuddy.0009_settings_timezone... OK
  Applying babybuddy.0010_auto_20200609_0649... OK
  Applying babybuddy.0011_auto_20200813_0238... OK
  Applying babybuddy.0012_auto_20201024_1847... OK
  Applying babybuddy.0013_auto_20210411_1241... OK
  Applying babybuddy.0014_settings_hide_empty... OK
  Applying babybuddy.0015_alter_settings_timezone... OK
  Applying babybuddy.0016_alter_settings_timezone... OK
  Applying babybuddy.0017_settings_hide_age... OK
  Applying babybuddy.0018_auto_20211017_2136... OK
  Applying babybuddy.0019_alter_settings_timezone... OK
  Applying babybuddy.0020_update_language_en_to_en_us... OK
  Applying babybuddy.0021_alter_settings_language... OK
  Applying babybuddy.0022_alter_settings_language... OK
  Applying babybuddy.0023_alter_settings_timezone... OK
  Applying babybuddy.0025_auto_20221023_0821... OK
  Applying babybuddy.0026_alter_settings_timezone... OK
  Applying babybuddy.0027_remove_standard_group... OK
  Applying core.0001_initial... OK
  Applying core.0002_auto_20171028_1257... OK
  Applying core.0003_weight... OK
  Applying core.0004_child_picture... OK
  Applying core.0005_auto_20190416_2048... OK
  Applying core.0006_auto_20190502_1701... OK
  Applying core.0007_temperature... OK
  Applying core.0008_auto_20190607_1422... OK
  Applying core.0009_diaperchange_amount... OK
  Applying core.0010_timer_child... OK
  Applying core.0011_auto_20200214_1939... OK
  Applying core.0012_auto_20200813_0238... OK
  Applying core.0013_auto_20210415_0528... OK
  Applying core.0014_alter_child_slug... OK
  Applying core.0015_add_nap_field_for_sleep... OK
  Applying core.0016_alter_sleep_napping... OK
  Applying core.0017_alter_child_last_name... OK
  Applying core.0018_bmi_headcircumference_height... OK
  Applying core.0019_tag_tagged_note_tags... OK
  Applying core.0020_bmi_tags_diaperchange_tags_feeding_tags_and_more... OK
  Applying core.0021_pumping... OK
  Applying core.0022_alter_default_date_and_time... OK
  Applying core.0023_alter_tag_options_alter_bmi_tags_and_more... OK
  Applying core.0024_alter_tag_slug... OK
  Applying core.0025_pumping_tags... OK
  Applying sessions.0001_initial... OK
[custom-init] No custom files found, skipping...
[2023-04-13 09:56:31 -0400] [220] [INFO] Starting gunicorn 20.1.0
[2023-04-13 09:56:31 -0400] [220] [INFO] Listening at: http://127.0.0.1:3000 (220)
[2023-04-13 09:56:31 -0400] [220] [INFO] Using worker: gthread
[2023-04-13 09:56:31 -0400] [232] [INFO] Booting worker with pid: 232
[2023-04-13 09:56:31 -0400] [233] [INFO] Booting worker with pid: 233
[ls.io-init] done.
Internal Server Error: /login/
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 357, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: attempt to write a readonly database
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.10/site-packages/django/views/generic/base.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/views/decorators/debug.py", line 92, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/utils/decorators.py", line 133, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/views/decorators/cache.py", line 62, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/contrib/auth/views.py", line 90, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/views/generic/base.py", line 142, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/views/generic/edit.py", line 153, in post
    return self.form_valid(form)
  File "/usr/lib/python3.10/site-packages/django/contrib/auth/views.py", line 109, in form_valid
    auth_login(self.request, form.get_user())
  File "/usr/lib/python3.10/site-packages/django/contrib/auth/__init__.py", line 118, in login
    request.session.cycle_key()
  File "/usr/lib/python3.10/site-packages/django/contrib/sessions/backends/base.py", line 304, in cycle_key
    self.create()
  File "/usr/lib/python3.10/site-packages/django/contrib/sessions/backends/db.py", line 54, in create
    self.save(must_create=True)
  File "/usr/lib/python3.10/site-packages/django/contrib/sessions/backends/db.py", line 86, in save
    obj.save(
  File "/usr/lib/python3.10/site-packages/django/db/models/base.py", line 812, in save
    self.save_base(
  File "/usr/lib/python3.10/site-packages/django/db/models/base.py", line 863, in save_base
    updated = self._save_table(
  File "/usr/lib/python3.10/site-packages/django/db/models/base.py", line 1006, in _save_table
    results = self._do_insert(
  File "/usr/lib/python3.10/site-packages/django/db/models/base.py", line 1047, in _do_insert
    return manager._insert(
  File "/usr/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 1791, in _insert
    return query.get_compiler(using=using).execute_sql(returning_fields)
  File "/usr/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1660, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 103, in execute
    return super().execute(sql, params)
  File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/usr/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 357, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: attempt to write a readonly database

[BUG] ModuleNotFoundError: No module named 'MySQLdb'

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Container does not restart any more.

Logs shows
ModuleNotFoundError: No module named 'MySQLdb'

Expected Behavior

Babybuddy should start

Steps To Reproduce

docker run -d --name babybuddy --restart=always
-p 88:8000
-v babybuddy_data:/config
-e TZ=Europe/Berlin
-e CSRF_TRUSTED_ORIGINS=http://127.0.0.1:88,REDACTED
-e DB_ENGINE=django.db.backends.mysql
-e DB_HOST=mariadb.REDACTED
-e DB_PORT=3306
-e DB_NAME=babybuddy
-e DB_USER=babybuddy
-e DB_PASSWORD=REDACTED
lscr.io/linuxserver/babybuddy:latest

Environment

- OS: Debian GNU/Linux 11
- How docker service was installed:

CPU architecture

x86-64

Docker creation

docker run -d --name babybuddy --restart=always \
	-p 88:8000 \
	-v babybuddy_data:/config \
	-e TZ=Europe/Berlin \
	-e CSRF_TRUSTED_ORIGINS=http://127.0.0.1:88,REDACTED \
	-e DB_ENGINE=django.db.backends.mysql \
	-e DB_HOST=mariadb.REDACTED \
	-e DB_PORT=3306 \
	-e DB_NAME=babybuddy \
	-e DB_USER=babybuddy \
	-e DB_PASSWORD=REDACTED \
	lscr.io/linuxserver/babybuddy:latest

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

using keys found in /config/keys
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
    import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/www/public/manage.py", line 26, in <module>
    execute_from_command_line(sys.argv)
  File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/lsiopy/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/lsiopy/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/lsiopy/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/www/public/babybuddy/models.py", line 13, in <module>
    from rest_framework.authtoken.models import Token
  File "/lsiopy/lib/python3.11/site-packages/rest_framework/authtoken/models.py", line 9, in <module>
    class Token(models.Model):
  File "/lsiopy/lib/python3.11/site-packages/django/db/models/base.py", line 143, in __new__
    new_class.add_to_class("_meta", Options(meta, app_label))
  File "/lsiopy/lib/python3.11/site-packages/django/db/models/base.py", line 371, in add_to_class
    value.contribute_to_class(cls, name)
  File "/lsiopy/lib/python3.11/site-packages/django/db/models/options.py", line 243, in contribute_to_class
    self.db_table, connection.ops.max_name_length()
                   ^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/django/utils/connection.py", line 15, in __getattr__
    return getattr(self._connections[self._alias], item)
                   ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/django/utils/connection.py", line 62, in __getitem__
    conn = self.create_connection(alias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/django/db/utils.py", line 193, in create_connection
    backend = load_backend(db["ENGINE"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/django/db/utils.py", line 113, in load_backend
    return import_module("%s.base" % backend_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
    import MySQLdb as Database

UMASK env variable not taken into account

Hello, and thank you for your work ! And sorry if at the end we find the bug comes from me ;)

Expected Behavior

Adding UMASK=077 in the docker-compose.yml file, I was thinking some files like data/.secretkey would not be readable by group and others.

Current Behavior

Adding UMASK=077 in the docker-compose.yml file, files like data/.secretkey are readable by group and others.

Steps to Reproduce

  1. Add - UMASK=077 in environment: section of docker-compose.yml
  2. Run docker-compose up
  3. Look at permissions of data/.secretkey

Environment

OS: Debian Bullseye
CPU architecture: x86_64
How docker service was installed: docker.io Debian official package

Command used to create docker container (run/create/compose/screenshot)

version: "2.1"
services:
babybuddy:
image: lscr.io/linuxserver/babybuddy
container_name: babybuddy
environment:
- PUID=127
- PGID=65534
- UMASK=077
- TZ=Europe/Paris
- DB_ENGINE=django.db.backends.mysql
- DB_HOST=/mysqld.sock
- DB_NAME=babybuddy
volumes:
- /home/babybuddy/data:/config
- /run/mysqld/mysqld.sock:/mysqld.sock
ports:
- 8000:8000
restart: unless-stopped`

Docker logs

Starting babybuddy ... done
Attaching to babybuddy
babybuddy | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
babybuddy | [s6-init] ensuring user provided files have correct perms...exited 0.
babybuddy | [fix-attrs.d] applying ownership & permissions fixes...
babybuddy | [fix-attrs.d] done.
babybuddy | [cont-init.d] executing container initialization scripts...
babybuddy | [cont-init.d] 01-envfile: executing...
babybuddy | [cont-init.d] 01-envfile: exited 0.
babybuddy | [cont-init.d] 02-tamper-check: executing...
babybuddy | [cont-init.d] 02-tamper-check: exited 0.
babybuddy | [cont-init.d] 10-adduser: executing...
babybuddy | usermod: no changes
babybuddy |
babybuddy | -------------------------------------
babybuddy | _ ()
babybuddy | | | ___ _ __
babybuddy | | | / | | | /
babybuddy | | | _
\ | | | () |
babybuddy | || |
/ || __/
babybuddy |
babybuddy |
babybuddy | Brought to you by linuxserver.io
babybuddy | -------------------------------------
babybuddy |
babybuddy | To support the app dev(s) visit:
babybuddy | BabyBuddy: https://github.com/sponsors/cdubz
babybuddy |
babybuddy | To support LSIO projects visit:
babybuddy | https://www.linuxserver.io/donate/
babybuddy | -------------------------------------
babybuddy | GID/UID
babybuddy | -------------------------------------
babybuddy |
babybuddy | User uid: 127
babybuddy | User gid: 65534
babybuddy | -------------------------------------
babybuddy |
babybuddy | [cont-init.d] 10-adduser: exited 0.
babybuddy | [cont-init.d] 30-config: executing...
babybuddy | Operations to perform:
babybuddy | Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, sessions
babybuddy | Running migrations:
babybuddy | No migrations to apply.
babybuddy | Your models in app(s): 'babybuddy' have changes that are not yet reflected in a migration, and so won't be applied.
babybuddy | Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
babybuddy | Cache table 'cache_default' already exists.
babybuddy | [cont-init.d] 30-config: exited 0.
babybuddy | [cont-init.d] 90-custom-folders: executing...
babybuddy | [cont-init.d] 90-custom-folders: exited 0.
babybuddy | [cont-init.d] 99-custom-files: executing...
babybuddy | [custom-init] no custom files found exiting...
babybuddy | [cont-init.d] 99-custom-files: exited 0.
babybuddy | [cont-init.d] done.
babybuddy | [services.d] starting services
babybuddy | [services.d] done.
babybuddy | [2022-02-19 09:46:51 +0100] [309] [INFO] Starting gunicorn 20.1.0
babybuddy | [2022-02-19 09:46:51 +0100] [309] [INFO] Listening at: http://0.0.0.0:8000 (309)
babybuddy | [2022-02-19 09:46:51 +0100] [309] [INFO] Using worker: gthread
babybuddy | [2022-02-19 09:46:51 +0100] [327] [INFO] Booting worker with pid: 327
babybuddy | [2022-02-19 09:46:51 +0100] [328] [INFO] Booting worker with pid: 328

Error when using postgres

Expected Behavior

Babybuddy application connecting to postgres db when configured to do so using DB_ENGINE.

Current Behavior

Error indicating libraries necessary for postgres are not present.

Steps to Reproduce

  1. Configure the docker container with env variable DB_ENGINE='django.db.backends.postgresql

Environment

OS: Debian GNU/Linux 10
CPU architecture: x86_64
How docker service was installed: official docker repo

Command used to create docker container (run/create/compose/screenshot)

Using ansible:

    - name: setup app container
      docker_container:
        name: "{{ babybuddy.container_name }}"
        image: ghcr.io/linuxserver/babybuddy
        restart_policy: unless-stopped
        state: started
        env:
          DB_ENGINE: "django.db.backends.postgresql"
          DB_PASSWORD: "{{ babybuddy_db_password }}"
        recreate: true
        purge_networks: true
        networks:
          - name: "{{ rp_network }}"
          - name: "{{ babybuddy.network }}"
        exposed_ports:
          - '8000'
        published_ports: []
        pull: yes

Docker logs

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
**** No secret key found, generating one ****
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 25, in <module>
    import psycopg2 as Database
  File "/usr/lib/python3.9/site-packages/psycopg2/__init__.py", line 51, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: Error loading shared library libpq.so.5: No such file or directory (needed by /usr/lib/python3.9/site-packages/psycopg2/_psycopg.cpython-39-x86_64-linux-musl.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/babybuddy/manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
    django.setup()
  File "/usr/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3.9/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3.9/site-packages/django/apps/config.py", line 301, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/app/babybuddy/babybuddy/models.py", line 5, in <module>
    from django.contrib.auth.models import User
  File "/usr/lib/python3.9/site-packages/django/contrib/auth/models.py", line 3, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/usr/lib/python3.9/site-packages/django/contrib/auth/base_user.py", line 48, in <module>
    class AbstractBaseUser(models.Model):
  File "/usr/lib/python3.9/site-packages/django/db/models/base.py", line 122, in __new__
    new_class.add_to_class('_meta', Options(meta, app_label))
  File "/usr/lib/python3.9/site-packages/django/db/models/base.py", line 326, in add_to_class
    value.contribute_to_class(cls, name)
  File "/usr/lib/python3.9/site-packages/django/db/models/options.py", line 207, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/usr/lib/python3.9/site-packages/django/utils/connection.py", line 15, in __getattr__
    return getattr(self._connections[self._alias], item)
  File "/usr/lib/python3.9/site-packages/django/utils/connection.py", line 62, in __getitem__
    conn = self.create_connection(alias)
  File "/usr/lib/python3.9/site-packages/django/db/utils.py", line 204, in create_connection
    backend = load_backend(db['ENGINE'])
  File "/usr/lib/python3.9/site-packages/django/db/utils.py", line 111, in load_backend
    return import_module('%s.base' % backend_name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 29, in <module>
    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: Error loading shared library libpq.so.5: No such file or directory (needed by /usr/lib/python3.9/site-packages/psycopg2/_psycopg.cpython-39-x86_64-linux-musl.so)
[...]

[BUG] Quickstart timer no longer works after update

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Clicking on the quick start timer button on the main page does nothing.

Expected Behavior

Clicking on the quick start timer button should start a timer.

Steps To Reproduce

Open babybuddy
Click quick start timer button
Nothing happens

Environment

- OS: Linux
- How docker service was installed: Via command-line

CPU architecture

x86-64

Docker creation

docker run -d \
  --name=babybuddy \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,https://babybuddy.domain.com \
  -p 8000:8000 \
  -v /path/to/appdata:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/babybuddy:latest

Container logs

No errors in log

Image ARM doesn't work

linuxserver.io


Expected Behavior

The application should works fine after the docker run on my raspberry 4 :

docker run -d \
  --name=babybuddy \
  -e TZ=Europe/London \
  -p 8000:8000 \
  -v /home/pi/baby:/config \
  --restart unless-stopped \
  ghcr.io/linuxserver/babybuddy:arm64v8-latest

Current Behavior

I've the error message :

standard_init_linux.go:211: exec user process caused "exec format error"

Should mean the image is not ARMx64 but AMDx64

Steps to Reproduce

  1. Run the docker run and watch the logs

Environment

OS: Raspbian GNU/Linux 10 (buster)
CPU architecture: arm64
How docker service was installed:

From the official way and their documentation

Command used to create docker container (run/create/compose/screenshot)

Informations above

Docker logs

Informations above

[BUG] S6 overlay issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When starting container it runs but i see the following log:

rm: cannot remove '/etc/s6-overlay/s6-rc.d/svc-php-fpm': Directory not empty
[custom-init] No custom services found, skipping...
s6-rc-compile: fatal: unable to read /etc/s6-overlay/s6-rc.d/svc-php-fpm/type: No such file or directory
s6-rc: fatal: unable to take locks: No such file or directory
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111

Expected Behavior

No response

Steps To Reproduce

Using this image:

REPOSITORY                      TAG              IMAGE ID       CREATED         SIZE
lscr.io/linuxserver/babybuddy   latest           c4e1900f8304   3 days ago      379MB

when i start it the container is running but i see the log above

Environment

- OS: Ubuntu 18.04 aarch64
- How docker service was installed: apt

CPU architecture

arm64

Docker creation

  babybuddy:
    image: lscr.io/linuxserver/babybuddy
    container_name: babybuddy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - DB_ENGINE=django.db.backends.postgresql
      - DB_HOST=postgresql
      - DB_NAME=babybuddy
      - DB_PASSWORD=xxxx
      - DB_USER=babybuddy
      - DEBUG=1
      - CSRF_TRUSTED_ORIGINS=http://192.168.200.2:8027,null
    volumes:
      - ~/babybuddy:/config
    ports:
      - 8000:8000
      - 8027:8000
    restart: unless-stopped

Container logs

rm: cannot remove '/etc/s6-overlay/s6-rc.d/svc-php-fpm': Directory not empty
[custom-init] No custom services found, skipping...
s6-rc-compile: fatal: unable to read /etc/s6-overlay/s6-rc.d/svc-php-fpm/type: No such file or directory
s6-rc: fatal: unable to take locks: No such file or directory
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111

[BUG] Timezone not affecting baby buddy timezone

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In docker-compose.yml if a timezone is set as such

- TZ=Europe/Rome

the timezone in baby buddy is not reflected

Expected Behavior

Baby buddy webui timezone is changed

Steps To Reproduce

Set timezone
docker-compose up -d
Browse to User/Settings and check Timezone

Environment

- OS: Debian 13
- How docker service was installed: sudo apt install

CPU architecture

x86-64

Docker creation

version: "3.2"
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy:latest
    container_name: babybuddy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
    volumes:
      - ./babybuddy/config:/config
    ports:
      - 8082:8000
    restart: unless-stopped

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: executing...
[migrations] 01-nginx-site-confs-default: succeeded
[migrations] 02-default-location: executing...
[migrations] 02-default-location: succeeded
[migrations] done
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝
   Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
Setting resolver to  127.0.0.11
Setting worker_processes to 8
generating self-signed keys in /config/keys, you can replace these with your own keys if required
.....+.....+....+...........+++++++++++++++++++++++++++++++++++++++*.+.+.........+..+...+......+....+.....+..........+..+...+.+..............+++++++++++++++++++++++++++++++++++++++*...+.............+...............+..+.........+....+............++++++
............+........+......+.+.....+...+.+...+...........+.......+..+..........+.....+......+.......+........+.......+..+......................+...+++++++++++++++++++++++++++++++++++++++*.+..+.+..+...+....+...........+.+.....+.+...+..+...+.......+++++++++++++++++++++++++++++++++++++++*..+...............+...+...+..+...+.+.....+.+..+.......+.........+..+...+.+........+..........+...+...............+.....+.............+.....+.......+..+.+....................+......+...+.............+........+.......+.....+...+.........+.......+.....+......+.......+.....+......+.+.....+..........+..............+....+...+..+..........++++++
-----
**** No secret key found, generating one ****
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, dbsettings, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying authtoken.0001_initial... OK
  Applying authtoken.0002_auto_20160226_1747... OK
  Applying authtoken.0003_tokenproxy... OK
  Applying axes.0001_initial... OK
  Applying axes.0002_auto_20151217_2044... OK
  Applying axes.0003_auto_20160322_0929... OK
  Applying axes.0004_auto_20181024_1538... OK
  Applying axes.0005_remove_accessattempt_trusted... OK
  Applying axes.0006_remove_accesslog_trusted... OK
  Applying axes.0007_alter_accessattempt_unique_together... OK
  Applying axes.0008_accessfailurelog... OK
  Applying babybuddy.0001_initial... OK
  Applying babybuddy.0002_add_settings... OK
  Applying babybuddy.0003_add_refresh_help_text... OK
  Applying babybuddy.0004_settings_language... OK
  Applying babybuddy.0005_auto_20190502_1701... OK
  Applying babybuddy.0006_auto_20190502_1744... OK
  Applying babybuddy.0007_auto_20190607_1422... OK
  Applying babybuddy.0008_auto_20200120_0622... OK
  Applying babybuddy.0009_settings_timezone... OK
  Applying babybuddy.0010_auto_20200609_0649... OK
  Applying babybuddy.0011_auto_20200813_0238... OK
  Applying babybuddy.0012_auto_20201024_1847... OK
  Applying babybuddy.0013_auto_20210411_1241... OK
  Applying babybuddy.0014_settings_hide_empty... OK
  Applying babybuddy.0015_alter_settings_timezone... OK
  Applying babybuddy.0016_alter_settings_timezone... OK
  Applying babybuddy.0017_settings_hide_age... OK
  Applying babybuddy.0018_auto_20211017_2136... OK
  Applying babybuddy.0019_alter_settings_timezone... OK
  Applying babybuddy.0020_update_language_en_to_en_us... OK
  Applying babybuddy.0021_alter_settings_language... OK
  Applying babybuddy.0022_alter_settings_language... OK
  Applying babybuddy.0023_alter_settings_timezone... OK
  Applying babybuddy.0025_auto_20221023_0821... OK
  Applying babybuddy.0026_alter_settings_timezone... OK
  Applying babybuddy.0027_remove_standard_group... OK
  Applying babybuddy.0028_alter_settings_language_alter_settings_timezone... OK
  Applying babybuddy.0029_create_cache_table... OK
  Applying dbsettings.0001_initial... OK
  Applying core.0001_initial... OK
  Applying core.0002_auto_20171028_1257... OK
  Applying core.0003_weight... OK
  Applying core.0004_child_picture... OK
  Applying core.0005_auto_20190416_2048... OK
  Applying core.0006_auto_20190502_1701... OK
  Applying core.0007_temperature... OK
  Applying core.0008_auto_20190607_1422... OK
  Applying core.0009_diaperchange_amount... OK
  Applying core.0010_timer_child... OK
  Applying core.0011_auto_20200214_1939... OK
  Applying core.0012_auto_20200813_0238... OK
  Applying core.0013_auto_20210415_0528... OK
  Applying core.0014_alter_child_slug... OK
  Applying core.0015_add_nap_field_for_sleep... OK
  Applying core.0016_alter_sleep_napping... OK
  Applying core.0017_alter_child_last_name... OK
  Applying core.0018_bmi_headcircumference_height... OK
  Applying core.0019_tag_tagged_note_tags... OK
  Applying core.0020_bmi_tags_diaperchange_tags_feeding_tags_and_more... OK
  Applying core.0021_pumping... OK
  Applying core.0022_alter_default_date_and_time... OK
  Applying core.0023_alter_tag_options_alter_bmi_tags_and_more... OK
  Applying core.0024_alter_tag_slug... OK
  Applying core.0025_pumping_tags... OK
  Applying core.0026_alter_feeding_end_alter_feeding_start_and_more... OK
  Applying core.0027_alter_timer_options_remove_timer_duration_and_more... OK
  Applying core.0028_alter_sleep_options_remove_sleep_napping_sleep_nap... OK
  Applying core.0029_alter_pumping_options_remove_pumping_time_and_more... OK
  Applying core.0030_weightpercentile_weightpercentile_unique_age_sex... OK
  Applying core.0031_note_image... OK
  Applying core.0032_child_birth_time... OK
  Applying core.0033_heightpercentile_and_more... OK
  Applying sessions.0001_initial... OK
Cache table 'cache_default' already exists.
[custom-init] No custom files found, skipping...
[2024-03-14 18:00:12 +0000] [259] [INFO] Starting gunicorn 21.2.0
[2024-03-14 18:00:12 +0000] [259] [INFO] Listening at: http://127.0.0.1:3000 (259)
[2024-03-14 18:00:12 +0000] [259] [INFO] Using worker: gthread
[2024-03-14 18:00:12 +0000] [284] [INFO] Booting worker with pid: 284
[2024-03-14 18:00:12 +0000] [285] [INFO] Booting worker with pid: 285
Connection to localhost (127.0.0.1) 3000 port [tcp/*] succeeded!
[ls.io-init] done.

Serving app under subdirectory not working

linuxserver.io

Serving under a subdirectory doesn't work in the docker container.

Expected Behavior

babybuddy should be served from /babybuddy, e.g. http://myserver:8000/babybuddy

Current Behavior

babybuddy is still being served from the root directory, e.g. http://myserver:8000/

Steps to Reproduce

  1. Follow the instructions here and add SUB_PATH=/babybuddy to the docker container
  2. docker-compose stop babybuddy
  3. docker-compose start babybuddy

Environment

OS:
CPU architecture: x86_64/arm32/arm64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

version: "2.1"
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy
    container_name: babybuddy
    environment:
      - TZ=UTC
      - SUB_PATH=/babybuddy
      - USE_24_HOUR_TIME_FORMAT=true
    volumes:
      - ~/docker-data/babybuddy:/config
    ports:
      - 8000:8000
    restart: unless-stopped

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, sessions
Running migrations:
  No migrations to apply.
  Your models in app(s): 'babybuddy' have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Cache table 'cache_default' already exists.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-03-26 21:44:55 -0500] [301] [INFO] Starting gunicorn 20.1.0
[2022-03-26 21:44:55 -0500] [301] [INFO] Listening at: http://0.0.0.0:8000 (301)
[2022-03-26 21:44:55 -0500] [301] [INFO] Using worker: gthread
[2022-03-26 21:44:55 -0500] [317] [INFO] Booting worker with pid: 317
[2022-03-26 21:44:55 -0500] [318] [INFO] Booting worker with pid: 318

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.