Tiny Tiny RSS vUNKNOWN (Unsupported)

.git is no longer a thing on those images, it gets version information using environment variables:

$ docker compose exec app sh
/ # env | grep COMM
CI_COMMIT_SHORT_SHA=1be15640
CI_COMMIT_SHA=1be156408af4f9291790dbda7131fd99369ca48f
CI_COMMIT_TIMESTAMP=2023-10-29T10:46:01+03:00
CI_COMMIT_BRANCH=master

you can try getting container logs and/or tt-rss event log to see if there’s anything logged there. other than that, i have no ideas.

Snippet from the docker-compose.yml @ https://tt-rss.org/wiki/InstallationNotes :

  app:
    image: cthulhoo/ttrss-fpm-pgsql-static:latest
    build:
      dockerfile: .docker/app/Dockerfile
      context: https://git.tt-rss.org/fox/tt-rss.git

Wouldn’t this result in a locally-built image cthulhoo/ttrss-fpm-pgsql-static:latest (i.e. not pulled from Docker Hub, thus no CI_ env vars)?

edit: @donotos maybe try commenting out the 3 build lines shown above.

same for me in my docker setup - I see the following:
[Tiny Tiny RSS] vUNKNOWN (Unsupported) © 2005-2023 [Andrew Dolgov]

env | grep COMM
CI_COMMIT_SHORT_SHA=
CI_COMMIT_SHA=
CI_COMMIT_TIMESTAMP=
CI_COMMIT_BRANCH=

I didn’t pay attention to that but you are right it build the container instead of using the image.

with a docker-compose.yml looking like this it use the image a it should:

  app:
    image: cthulhoo/ttrss-fpm-pgsql-static:latest
#    build:
#      dockerfile: .docker/app/Dockerfile
#      context: https://git.tt-rss.org/fox/tt-rss.git
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - app:/var/www/html
      - ./config.d:/opt/tt-rss/config.d:ro
    depends_on:
      - db

and this is it. After erasing everything and restarting a new instance it work as expected:

/ # env | grep COMM
CI_COMMIT_SHORT_SHA=1be15640
CI_COMMIT_SHA=1be156408af4f9291790dbda7131fd99369ca48f
CI_COMMIT_TIMESTAMP=2023-10-29T10:46:01+03:00
CI_COMMIT_BRANCH=master

ok in the web page too.

Thanks

But this will not work on 32-bit plattfoms like the raspberrypi

If you use a build instead of an image you could add thoses variables in your container environement and it will work.
First you can get the .git from the repo:
git clone --no-checkout https://git.tt-rss.org/fox/tt-rss.git
then put the necessary variables in a file:

cat << EOF > .version
CI_COMMIT_SHORT_SHA=$(git --git-dir=./tt-rss/.git log -1 --format=%h)
CI_COMMIT_SHA=$(git --git-dir=./tt-rss/.git log -1 --format=%H)
CI_COMMIT_TIMESTAMP=$(git --git-dir=./tt-rss/.git log -1 --format=%cI)
CI_COMMIT_BRANCH=master
EOF

Then just add .version just bellow .env in docher-compose.yml

did you do docker-compose build or docker-compose pull? maybe build: stuff should be removed from the default compose file and left in a FAQ entry for alternative platforms or something. :thinking:

i’ll amend the compose file showing on tt-rss.org/installationguide.

self-built images showing unsupported would be technically correct - i don’t really want to support something that didn’t go through my automated testing and build pipelines.

adding some kind of solution to show version info for self-built images is a good idea tho.

how about this?

https://gitlab.tt-rss.org/tt-rss/tt-rss/-/wikis/InstallationNotes#docker-composeyml

https://gitlab.tt-rss.org/tt-rss/tt-rss/-/wikis/InstallationNotes#your-images-wont-run-on-raspberry-pi

good enough or needs further clarification?

Yes i removed the build: in order to pull the images. and maybe you should remove it from web-nginx: too.
Maybe adding a mention (unsuported build) after the version would be better than showing no version?
I think that way because since your versionings are based on the commit hash, even if you use an unoficial build, that build will still have an “official” version.

good point. having it there shouldn’t stop you from pulling but i guess it could be confusing.

yep. would be easier to figure out things in case of questions.

e: i’ll link your above post with .version env file in the FAQ because i have no idea how to do this using compose, .git repo is not passed as docker context anymore so :person_shrugging:

this won’t work with docker compose auto-cloning off git repo though. oh boy.

i guess i’ll just remove .git from default .dockerignore and adjust it in the CI pipeline.

looks like docker compose build omits passing .git to build context when building from the repository so there’s literally no way to figure out version information.

i’m not going to waste any more time on this. use amd64 or suffer.

Thanks, I tried it but the expressions are not resolved. Therefore I see the code in the variables.

env | grep COMM
CI_COMMIT_SHORT_SHA=$(git --git-dir=./tt-rss/.git log -1 --format=%h)
CI_COMMIT_SHA=$(git --git-dir=./tt-rss/.git log -1 --format=%H)
CI_COMMIT_TIMESTAMP=$(git --git-dir=./tt-rss/.git log -1 --format=%cI)
CI_COMMIT_BRANCH=master

yeah you’ll have to prepare the file manually using a shellscript or something, .env files are just text, they won’t run commands (and neither would docker compose). :frowning_face:

If you use the 2 code blocks i gave above in your shell (just copy / paste the lines in the same directory your docker-compose.yml is) it will generate the .version file.

ok thanks, then I just misunderstood your comment.

btw if you clone the repo anyway, a post-merge git hook would work to update this file automatically before building.

I’m now using a shell skript to update the repo, create the .version file and to start the docker container.

@fox @donotos thanks for your support!

Keep .git directory

By default, BuildKit doesn’t keep the .git directory when using Git contexts. You can configure BuildKit to keep the directory by setting the BUILDKIT_CONTEXT_KEEP_GIT_DIR build argument. This can be useful to if you want to retrieve Git information during your build:

:thinking: maybe it’s not all lost.

okay, so this compose override seems to work for me without any additional hacks to show version:

# docker-compose.override.yml
version: '3'

services:
  app:
    image: cthulhoo/ttrss-fpm-pgsql-static:latest
    build:
      dockerfile: .docker/app/Dockerfile
      context: https://git.tt-rss.org/fox/tt-rss.git
      args:
        BUILDKIT_CONTEXT_KEEP_GIT_DIR: 1

  web-nginx:
    image: cthulhoo/ttrss-web-nginx:latest
    build:
      dockerfile: .docker/web-nginx/Dockerfile
      context: https://git.tt-rss.org/fox/tt-rss.git

this probably won’t work if you’re not using BuildKit (ancient docker? i dunno).

2 Likes