Comments (8)
@ozh I honestly have no opinion on this point.
That being said, it could be weird to have YOURLS checking the env for only 2 variables. And might raise a case for its volatility.
from images.
Your code :
yourls_user_passwords = [
'user' => 'passwordwithoutand getenv_docker('YOURLS_USER') => getenv_docker('YOURLS_PASS'),',
];
Sets a user with username "user
", and the password is the following string : "passwordwithoutand getenv_docker('YOURLS_USER') => getenv_docker('YOURLS_PASS'),
", which I'm not sure is what you're trying to achieve.
Chars in passwords are not "escaped" and you can use any char in your passwords, see the ones used in unit tests.
There is no bug there. If you're not sure about how to use a setting or config, please open a discussion instead.
from images.
Hey @ozh, the code snippet is the result of the config file that is auto-generated if you would set the environment variables
- YOULRS_USER="user"
- YOURLS_PASS="passwordwithoutand&"
using these settings the docker images fails and just prints a php error, which is due - i guess - to the config.php being generated in a wrong way
i solved it by using another password without "&", and it works now, so i don't care what you do with this information. but i thought you might be interested in this bug, but sure just leave the bug in
if someone else observes the same issue just remove the "&" from your password
from images.
if you want to reproduce:
version: '3.1'
services:
yourls:
image: yourls
restart: always
ports:
- 8080:80
environment:
YOURLS_DB_PASS: example
YOURLS_SITE: http://localhost:8080/
YOURLS_USER: example_username
YOURLS_PASS: "example_password&"
mysql:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: yourls
localhost:8080/admin
Parse error: syntax error, unexpected identifier "YOURLS_USER", expecting "]" in /var/www/html/user/config.php on line 75
from images.
Thanks for opening the ticket @JustinGuese.
I can reproduce, indeed.
The behavior is caused by the sed command on the entrypoint.
https://github.com/YOURLS/docker/blob/2dec68f8872e6634020c3795e1f87504a4a65c22/docker-entrypoint.sh#L80
from images.
This change should do the trick: 10a7a68
(#165)
Do you confirm?
from images.
@LeoColomb would it be simpler and make sense if we checked for YOURLS_USER and YOURLS_PASS env var in YOURLS/YOURLS itself ?
from images.
@LeoColomb should work as a "quickfix". i mean it's a rare case, so probably not causing too much trouble
from images.
Related Issues (20)
- Dependency Dashboard
- docker container doesn't start after resetting the container HOT 7
- Images on dockerhub and github registry not the same HOT 2
- Setting environment variables to falsy values (0, empty string, etc) reverts to default value HOT 1
- config.php belongs to user root by default: Could not auto-encrypt passwords. Error was: "cannot write file". HOT 2
- Docker data not persisted HOT 6
- Old logo on Docker Hub HOT 1
- Error setting `USER` in `Dockerfile` HOT 4
- docker update HOT 1
- Latest Github Expiry plugin not working with latest version of YOURLS HOT 1
- Automatic inclusion of plugin-specific configuration HOT 1
- Volume in docker-compose.yml HOT 2
- Diverts to `install.php` after pulling latest image HOT 5
- There is no option to define TZ based Offset in the Docker image HOT 1
- White screen with 1.8 image
- White screen with 1.8 using docker HOT 19
- It seems something wrong with your demo yml configs ? HOT 2
- Docker setup doesn't work at all HOT 3
- Mysqli with SSL is broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from images.