Synology Container Update from 0.25.8

Hello,

I’m new in this forum, but I’ve been using dawarich very successfully on my Synology NAS for about a year now.

Without this app, I would never have thought of tracking my location history. Unfortunately, I couldn’t get past version 0.25.8 because there were changes at the time that I couldn’t implement.

Now that so much has changed, family location, Android app, etc., I would like to try an update.

Unfortunately, the instructions refer to docker in the shell, which I cannot find in syno. I do have a Portainer.

Can anyone help me find the right approach to upgrade my version 0.25.8 to the current one?

greetz

dipsy

What were the changes you couldn’t implement? What specific issues you’re experiencing? Feel free to share your logs

Hello Freika,

I started with dawarich 0.2xx.x and always selected the latest image in Container Manager. With the switch to 0.26.0, it is necessary to convert the PostgreSQL database from 14 to 17. I did not do this due to a lack of knowledge, and the containers no longer started. My approach at the time was to switch from the latest to 0.25.8. In hindsight, that was not a smart decision.

Now I wanted to take another look at the issue. I stopped the project and performed a complete backup of the four containers and the database. Then I opened docker-compose.yml and created the entry for the service and the volume. According to the instructions at Updating to PostgreSQL 17 with PostGIS | Dawarich , step 2 is to create a dump of the database via the console. Now don’t laugh at me, but which console do I have on the Synology?

Perhaps one option would be to set up a new project and re-upload the database, but to be honest, I want to manage the update.

greetz

dipsy

Hello,

Does anyone have any advice for me?

greetz dipsy

Is it an option for you to try and proceed without updating Postgres? If you have a backup from PG14 you can try simply update Dawarich without upgrading Postgres. It should work with no issues database-version-wise

Hello Freika,

That is certainly an option; I can easily create a new backup.

But what should I enter in docker-compose.yml?

I currently have the following in there

version: '3'

services:
  dawarich_redis:
    image: redis:7.0-alpine
    container_name: dawarich_redis
    command: redis-server
    restart: unless-stopped
    volumes:
      - ./redis:/var/shared/redis

  dawarich_db_pg_17:
  image: postgis/postgis:17-3.5-alpine
  shm_size: 1G
  container_name: dawarich_db_pg_17
  volumes:
    - dawarich_db_data_pg_17:/var/lib/postgresql/data
    - dawarich_shared:/var/shared
  networks:
    - dawarich
  environment:
    POSTGRES_USER: postgres
    POSTGRES_PASSWORD: password
  restart: always
  healthcheck:
    test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
    interval: 10s
    retries: 5
    start_period: 30s
    timeout: 10s

volumes:
  dawarich_db_data:
  dawarich_shared:
  dawarich_public:
  dawarich_watched:
  dawarich_db_data_pg_17:

dawarich_db:
    image: postgis/postgis:14-3.5-alpine
    container_name: dawarich_db
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${DATABASE_USERNAME}
      POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
    volumes:
      - ./db_data:/var/lib/postgresql/data
      - ./db_shared:/var/shared

  dawarich_app:
    image: freikin/dawarich:0.25.8
    container_name: dawarich_app
    depends_on:
      - dawarich_db
      - dawarich_redis
    stdin_open: true
    tty: true
    entrypoint: web-entrypoint.sh
    command: ['bin/dev']
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - ./public:/var/app/public
      - ./app_storage:/var/app/storage
    ports:
      - 32568:3000

  dawarich_sidekiq:
    image: freikin/dawarich:0.25.8
    container_name: dawarich_sidekiq
    depends_on:
      - dawarich_db
      - dawarich_redis
      - dawarich_app
    entrypoint: sidekiq-entrypoint.sh
    command: ['sidekiq']
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - ./public:/var/app/public
      - ./app_storage:/var/app/storage

Should I leave the volumes and image entries or remove them?

Which version should I switch to? My initial plan was to go to 0.26.0.

Best regards

You can use this guide: Updating Guides | Dawarich

Compare your compose to the one from the next version and made appropriate adjustments, or just follow the updating guide, the changelogs always contain instructions on how to update in case of breaking changes

But I’m following the instructions, which say to create a dump of 14 and upgrade it to 17. Trying without this database upgrade results in this ugly screen.

The yml file I posted cannot be read.

So I’m at a dead end.

Postgres 17 won’t start after editing.

hannes@homenas:/volume1/docker/dawarich$ sudo docker compose -f /volume1/docker/dawarich/docker-compose.yml up dawarich_db -d
validating /volume1/docker/dawarich/docker-compose.yml: (root) Additional property dawarich_db_pg_17 is not allowed
hannes@homenas:/volume1/docker/dawarich$

Your compose file is clearly invalid, please make sure it’s properly formatted and compre to the default one for reference

Hi Freika,

Thanks for the detailed help.

I’ve also noticed that the guide for updating Postgres doesn’t work. The best approach is to delete the old file it still works. It’s just that the update instructions have some gaps. As soon as you follow the guide, an error pops up. But I’m sure I’m the only one with this problem. Let’s just stick with the old database until the cows come home. I’ll look around for alternatives. That’s one way to bury a cool project.

Bye

Sorry you left disappointed. Upgrading postgres is not a necessity btw, once you have postgis in it, Dawarich will work fine with version 14.

I’d also suggest considering providing more context: what error pops up, at what step and so on. Thanks for giving Dawarich a shot

Hi Freika,

First of all, it’s important to say that my personal data, location data, and their confidentiality are very important to me. I invest time and money to ensure that I don’t give all my data to Google, Apple, and the like. What I mean is that without this project, I would gladly do without a timeline. Now that the Family option has been introduced, I was tempted to upgrade and invite other family members.

Now to the update itself. It is impossible to activate an incorrectly formatted YAML file via the Synology interface.

The problem boils down to the fact that the app container constantly restarts because it’s looking for data that simply doesn’t exist yet. I finally got Postgres working after several hours by simply installing and starting the Postgres container. This allowed the data to be imported into the new version. I consider the advice to stay on version 14 dangerous; the entire internet recommends a quick switch, since nothing is being fixed here anymore. After I was on 0.26.1, I tried upgrading to 0.27.0, which is also what the instructions specify. But SolidQueue and SolidCache, in conjunction with the app, are the final bosses. After thousands of reboot loops caused by an app container waiting for the SolidCache database that wasn’t created, I decided to use the GPX export and manually enter my 10 trips into the new project.

I highly recommend providing scripts for such major changes, just as others do. Backup data, shut down containers, convert data, load new containers, start the import, and possibly include a fix script as well. There’s a German smart-home project built on Java that’s been run this way for years. Every time a user gets help there, the donation account grows because people are being helped.

greetz dipsy