OliveTin EZ-Start: A New Way to Deploy OliveTin-for-Channels Using Just Two Environment Variables to Get Started!

@chDVRuser If on your Synology you run:

docker info 2>/dev/null | grep Kernel

what do you get? I'm thinking about querying the docker host to get that value, as I believe it would be pretty good for offering suggestions for several OS-specific things.

On Windows, it looks like this:

Kernel Version: 5.15.167.4-microsoft-standard-WSL2

@chDVRuser Also, it appears it's OK to have comments in with your Poratiner env vars. I'll test it more tomorrow, but if it holds true with the testing I've done, I could add OS specific comments to certain values. Like the need to create a directory on Synology first before deploying, or the limited writable paths on Mac Docker hosts.

1 Like
My older Synology NAS
# docker info
 Server:
  Server Version: 20.10.3
  Kernel Version: 3.10.108
Portainer Host Details
 Kernel Version 3.10.108
 Engine Details
  Version 20.10.3 (API: 1.41)

My newer Synology NAS
# docker info
Server:
 Server Version: 24.0.2
 Kernel Version: 4.4.302+
Portainer Host Details
 Kernel Version 4.4.302+
 Engine Details
  Version 24.0.2 (API: 1.43)
1 Like

Much better than reading comments in the compose statement and having to find the env vars below in Portainer!

FYI

Fails to create container on Synology. No host link or file named /etc/timezone

      - /etc/timezone:/etc/timezone      # fails on Synology

had to modify this for it to work on Synology NAS

      - /etc/TZ:/etc/timezone:ro         # works on Synology

OR use this

      - /etc/localtime:/etc/localtime:ro # works on Synology

Rats! None of the options that work on Synology also work on Debian -- so I'll remove that binding. Thanks for checking.

Figures :frowning_face:

I dismissed /etc/localtime because it's a binary. But, I get:

/usr/share/zoneinfo/America/Denver

With:

readlink -f /etc/localtime

Does that work for you?

On my Synology NAS's it's a link

# ls -l /etc | grep time
lrwxrwxrwx  1 root       root          34 Oct 11  2022 localtime -> /usr/share/zoneinfo/Canada/Pacific

and /etc/TZ is a file

# ls -l /etc/TZ
-rw-r--r-- 1 root root 23 Oct 11  2022 /etc/TZ
# cat /etc/TZ
PST8PDT,M3.2.0,M11.1.0

Does readlink work?

Just tested on WSL Linux, and it works there too. We might have a winner...

Yes

# readlink localtime
/usr/share/zoneinfo/Canada/Pacific

But there is no link or file named /etc/timezone, only the file TZ and link localtime

I'm inclined to go with it. If it works on Synology, and Debian (which so many other distros are based on) -- it seems like a pretty good bet:

As you suggested:

- /etc/localtime:/etc/localtime:ro

As long as the binding doesn't cause the spin-up to fail, I feel like there's a good chance I can extrapolate the timezone.

I think I need to find out what happened to the now 0 byte file /usr/share/zoneinfo/Canada/Pacific

# ls -l /etc/localtime
lrwxrwxrwx 1 root root 34 Oct 11  2022 /etc/localtime -> /usr/share/zoneinfo/Canada/Pacific

# readlink /etc/localtime
/usr/share/zoneinfo/Canada/Pacific

# ls -l /usr/share/zoneinfo/Canada/Pacific
-rw-r--r-- 2 root root 0 Mar 25 00:55 /usr/share/zoneinfo/Canada/Pacific

# cat /etc/localtime

# cat /usr/share/zoneinfo/Canada/Pacific

# cat /etc/TZ
PST8PDT,M3.2.0,M11.1.0

Don't know what I did, but it's now a 0 byte file

# stat /usr/share/zoneinfo/Canada/Pacific
  File: /usr/share/zoneinfo/Canada/Pacific
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 900h/2304d      Inode: 6701        Links: 2
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2025-02-25 21:41:10.834000162 +0000
Modify: 2025-03-25 00:55:34.318494766 +0000
Change: 2025-03-25 00:55:34.318494766 +0000
 Birth: -

Fixed it, I'm in the US, not Canade, so

root@DS1513PLUS:/etc# ls -l | grep time
lrwxrwxrwx  1 root       root          34 Oct 11  2022 localtime -> /usr/share/zoneinfo/Canada/Pacific

root@DS1513PLUS:/etc# ln -f -s /usr/share/zoneinfo/US/Pacific localtime

root@DS1513PLUS:/etc# ls -l | grep time
lrwxrwxrwx  1 root       root          30 Mar 24 18:42 localtime -> /usr/share/zoneinfo/US/Pacific

Great.

I'm working on the next generation of EZ-Start, which will allow spinning-up OliveTin from the command line, and install CDVR (if not already present) with extensions from there.

I'm hoping to continue to hit you up with the occasional sanity check on old/new Synology compatibility, with the most recent being:

Does this work, and what's the output:

timedatectl show --property=Timezone --value

So far, this works on Debian and derivatives, including WSL2 Linux...

my output on Debian and Ubuntu WSL2 is: America / Los Angeles. I expected to see US / Pacific.

That is what mine is I have never used US/Pacific.

Both Continent/City and Country/Timezone are generally acceptable for most purposes -- for OliveTin either is fine. Continent/City is the more "modern" approach as I recall, but I've always liked Country/Timezone. :slight_smile: Something about dogs and tricks comes to mind...

The timedatectl utility is not available on either of my Synology NAS's