Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old Commit Revision Unknown #176

Closed
RaymondMouthaan opened this issue Jul 12, 2018 · 19 comments
Closed

Old Commit Revision Unknown #176

RaymondMouthaan opened this issue Jul 12, 2018 · 19 comments
Assignees

Comments

@RaymondMouthaan
Copy link
Contributor

Heya @reloxx13,

I've added two environment variables to the docker image. BUILD_VERSION and BUILD_REF, both can be used to determine the current version / commit from within a running docker container.

If added these so that tasmoadmin can display the current version / revision instead of unknown. Could you please extent the php code (see http://php.net/manual/en/function.getenv.php) to read these environment variables and display the current version / revision?

example:
BUILD_VERSION: v1.3.1
BUILD_REF: 6db1acb

Some textual changes i suggest are:

  • replace "Old Commit Revision" with "Current Version" or "Current Release"
  • replace "New Commit Revision" with "New Version" or "New Release"

So in a full example:

Current version v1.3.1 >> New version v1.4.0

As a bonus it would be nice to hyperlink both versions to related GitHub tags

Greetz,
Ray

@reloxx13
Copy link
Collaborator

yep, will do 👍

@RaymondMouthaan
Copy link
Contributor Author

Awesome 😇👍🏽

@reloxx13
Copy link
Collaborator

reloxx13 commented Jul 12, 2018

done (in next release) but i cannot test it.

do you create test docker images local?

i tried it on a raspberry but it fails cuz of the architecture and did not got it fixed now. ate a few hours already 💩

guess i need to rape my ubuntu vm for this.

@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented Jul 13, 2018

@reloxx13, I simply created v1.5.0-beta1 and enabled pre-release option. After pulling it from docker hub and running it from my Synology NAS (amd64) it gives the following:

screen shot 2018-07-13 at 07 57 24

Besides all warnings, on the SelfUpdate page Current Version Unknown.
screen shot 2018-07-13 at 08 20 19

I checked the environment variables within the running container and they are nicely added.

screen shot 2018-07-13 at 08 24 42

@reloxx13
Copy link
Collaborator

Oo ill check it tonight

@reloxx13
Copy link
Collaborator

try it in firefox pls, this expire date is a chrome issue i think.

@reloxx13 reloxx13 added todo and removed DONE labels Jul 13, 2018
@RaymondMouthaan
Copy link
Contributor Author

Just tested Safari, Chrome and FF, they all show the same results (warnings).

@reloxx13
Copy link
Collaborator

reloxx13 commented Jul 13, 2018

just installed a fresh docker pull, no problems x.x

ahaha forget it, errors after login

@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented Jul 13, 2018

that's weird, I just deleted the container, the data dir and all tasmoadmin images (so fully fresh install) ... ran the new container with:

docker run -d -v /volume1/docker/tasmoadmin:/data -p8091:80 --name beta-tasmoadmin raymondmm/tasmoadmin:v1.5.0-beta1-alpine-amd64

And it still complains about line 42 of the config.php, which is:

setcookie( "MyConfig", $configJSON, intval( time()+( 8640000000*30 ) ), "/" );

Also the current version remains Unknown.

Any suggestion?

reloxx13 added a commit that referenced this issue Jul 13, 2018
@RaymondMouthaan
Copy link
Contributor Author

Login page displays fine, but afterwards the warnings appear

reloxx13 added a commit that referenced this issue Jul 13, 2018
@reloxx13
Copy link
Collaborator

reloxx13 commented Jul 13, 2018

TODO: echo "fastcgi_param BUILD_VERSION tagnumber;" >> /etc/nginx/fastcgi_params

@RaymondMouthaan do you now where to put this in best case?

ENV vars are not passed to fcgi without this, thats why php cannot find it.

new beta after this is in.

@reloxx13
Copy link
Collaborator

sth like this:
docker-library/php#74 (comment)

@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented Jul 13, 2018

Not sure what needs to be done within the docker image .. We are not using a fpm image but from what I understand is that we need a php-fpm.conf file with some settings (i.e. clear_env = Yes ??? ) and add this to the docker image while building it?

@reloxx13
Copy link
Collaborator

reloxx13 commented Jul 13, 2018

nuu, same problem exists for our using fcgi

this string:
fastcgi_param BUILD_VERSION tagnumber;

tagnumber = replace with travis variable

needs to be in this file
/etc/nginx/fastcgi_params

in short:
echo "fastcgi_param BUILD_VERSION tagnumber;" >> /etc/nginx/fastcgi_params

the FPM link was just to know how they got it into the docker script.

for docker i think it should be:

RUN echo "fastcgi_param BUILD_VERSION ${BUILD_VERSION};" >> /etc/nginx/fastcgi_params
RUN echo "fastcgi_param BUILD_REF ${BUILD_REF};" >> /etc/nginx/fastcgi_params

Added this after he installation of nginx now.

@reloxx13
Copy link
Collaborator

its working!! 🚀

pls update 👍

@reloxx13 reloxx13 added DONE and removed todo labels Jul 13, 2018
@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented Jul 13, 2018

Just to confirm it is working 🥇 💯 , yeeeaah!

screen shot 2018-07-13 at 12 33 52

Although I am wondering why it shows v1.4.0 as a newer version, shouldn't this be something like "none" ?

@reloxx13
Copy link
Collaborator

reloxx13 commented Jul 13, 2018

Version comparsion is not set up correctly and will be hard with "-beta".

Currently it just checks if current is not latest

Results in new update for now:
1.3.0 != 1.4.0
1.5.0 != 1.4.0

In past their was no way to have a higher version as the latest 📦 so if your current is not latest, their is an update :D

and latest is taken by git releases which looks like its not including pre-releases.
results in: latest git is still 1.4.0

@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented Jul 13, 2018

Alright, lets stay at this approach :)

Let's close this issue .. the honour is all yours to release v1.5.0 ;)

@RaymondMouthaan
Copy link
Contributor Author

Closed

inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Oct 14, 2020
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Oct 14, 2020
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Oct 14, 2020
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Apr 11, 2022
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Apr 11, 2022
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants