Skip to content

[BUG] When recreating the container my settings are gone #120

@me1299

Description

@me1299

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I recreate the container and pull the latest image. The container is recreated, and boots up. I'm presented with this screen:

image

Expected Behavior

I expect my settings to still be there and to just upgrade the container. I have to restore a backup everytime I upgrade to get my stuff back.

Steps To Reproduce

  unifi-db:
    image: docker.io/mongo:7.0.11
    container_name: unifi-db
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERDIR}/unifi-db/data:/data/db
      - ${DOCKERDIR}/unifi-db/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
    ports:
      - 27017:27017
    restart: unless-stopped

  unifi:
    image: lscr.io/linuxserver/unifi-network-application:latest
    container_name: unifi
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - MONGO_USER=unifi
      - MONGO_PASS=*********
      - MONGO_HOST=unifi-db
      - MONGO_PORT=27017
      - MONGO_DBNAME=unifi-db
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERDIR}/unifi-network-application/data:/data/config
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      - 8843:8843
      - 8880:8880
      - 6789:6789
      - 5514:5514/udp
    restart: unless-stopped
    networks:
      - default

One thing I notice is that nothing is written in ${DOCKERDIR}/unifi-network-application/data
But I can enter the container (/BIN/BASH) and see the directory and create files etc without issues.

Environment

- OS: Ubuntu 22.04.4 LTS
- How docker service was installed:

CPU architecture

x86-64

Docker creation

I use the composer configuration as stated above.

Container logs

[migrations] started

[migrations] no migrations found

───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗

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

      ██║     ███████╗██║██║   ██║

      ██║     ╚════██║██║██║   ██║

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

      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io

───────────────────────────────────────

To support LSIO projects visit:

https://www.linuxserver.io/donate/

───────────────────────────────────────

GID/UID

───────────────────────────────────────

User UID:    1000

User GID:    997

───────────────────────────────────────

Linuxserver.io version: 8.5.6-ls68

Build-date: 2024-10-22T17:31:57+00:00

───────────────────────────────────────

    

*** Waiting for MONGO_HOST unifi-db to be reachable. ***

Generating 4,096 bit RSA key pair and self-signed certificate (SHA384withRSA) with a validity of 3,650 days

	for: CN=unifi

[custom-init] No custom files found, skipping...

[ls.io-init] done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions