Coder Social home page Coder Social logo

Comments (10)

LeoColomb avatar LeoColomb commented on June 8, 2024 1

Thanks for your report @ksarnelli.
That's actually normal, because the environment variable you're looking for is YOURLS_DB_PREFIX.

But indeed documentation on the Docker Hub is wrong! That is a really good catch.
I'll fix it soon.

from images.

ksarnelli avatar ksarnelli commented on June 8, 2024 1

Thanks - I actually prefer no table prefix. Is this possible with the current docker version?

I'm migrating from a standard install to the docker container and it looks like the container is set to always use 'yourls_' when the environment variable is blank. The non-container version defaults to blank.

from images.

LeoColomb avatar LeoColomb commented on June 8, 2024

The non-container version defaults to blank.

I'm afraid you're wrong! 😄

https://github.com/YOURLS/YOURLS/blob/c43e9237005f50ded9796f5f5da058182c50dad7/user/config-sample.php#L27

I actually prefer no table prefix

I totally understand and even agree, but we can't change the default behavior without breaking a lot of database already in use.
This update will probably come in next major release.

from images.

ksarnelli avatar ksarnelli commented on June 8, 2024

I probably worded that wrong. I meant the standard version supports (not defaults to) a blank table prefix :)
Doesn't look like there is a way to currently do this with the docker without the pull request I just submitted.

from images.

ksarnelli avatar ksarnelli commented on June 8, 2024

I totally see your point regarding breaking existing installs. Maybe a workaround would be an additional environment variable 'YOURLS_DB_USE_TABLE_PREFIX' (bool) that defaults to true. If you accept this approach I can submit a pull request.

from images.

LeoColomb avatar LeoColomb commented on June 8, 2024

@ksarnelli Adding a new variable is something I would try to avoid.
I suggest you link the volume with you own config file where you can tweak everything.

from images.

LeoColomb avatar LeoColomb commented on June 8, 2024

Closing as per docker-library/docs#1662

from images.

semoog avatar semoog commented on June 8, 2024

Trying to migrate to using this image from an old manual YOURLS install with an empty table prefix, and ran into this frustrating issue as well. Would love to be able to set YOURLS_DB_PREFIX empty (without having to do custom configuration, trying to run the image straight from the hub on kubernetes using ENVs). It's currently set to "" but is not being respected. Sorry to necro, but it seems like an important detail since it was / is supported in the non docker version.

from images.

LeoColomb avatar LeoColomb commented on June 8, 2024

@semoog YOURLS_DB_PREFIX can't be empty, or it'll be replaced by the default value.

from images.

semoog avatar semoog commented on June 8, 2024

In my old (non-docker) installation I have it set to an empty string and it works, using the tables urls, options, and log with no prefix:

define( 'YOURLS_DB_PREFIX', '' );

As I'm trying to migrate and use / support the old short urls database in the process, I need the install to respect this variable like the previous install did. Is this something that's been removed from docker-yourls intentionally? Or just something that has not been implemented in the same way? Trying to keep it as off-the-shelf as possible for obvious reasons. Otherwise I will have to migrate the data. Just curious if this was done for any specific reason!

from images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.