ajanvier / docker-polr Goto Github PK
View Code? Open in Web Editor NEWThis project forked from trafex/docker-php-nginx
Unofficial Docker image for Polr. https://polrproject.org
This project forked from trafex/docker-php-nginx
Unofficial Docker image for Polr. https://polrproject.org
I think this is an issue of not understanding the install process for this, and I'm hoping you can help clarify if that's the case or not.
I've installed using the following CLI command (passwords redacted)
docker run -d
--name polr
--env DB_HOST='localhost'
--env DB_DATABASE='rdw_polr_docker'
--env DB_USERNAME='rdw_polr_docker'
--env DB_PASSWORD='dbPassword'
--env APP_ADDRESS='rdw.one'
--env ADMIN_USERNAME='heatheriac'
--env ADMIN_PASSWORD='password'
--publish 18180:8080
--restart always
ajanvier/polr`
but in my logs in Portainer, I just get the same three lines repeating over and over:
wait-for-it.sh: waiting 120 seconds for localhost:3306
wait-for-it.sh: timeout occurred after waiting 120 seconds for localhost:3306
wait-for-it.sh: strict mode, refusing to execute subprocess
It's like the database isn't spinning up, and I'm not sure if this means if there's some secondary container I'm supposed to be running or what
Environment variables used by this docker image sometimes differ from what Polr actually uses (nameley ST_
vs SETTING_
). Moreover the readme contains Polr specific names, which won't work once you set them. This is confusing, any particular reason to do it that way?
Line 60 in be222cf
Hi! Thank you for making this docker image - really appreciate it. I ran in to an issue when running a GET/POST
on the action/lookup
endpoint. When using the endpoint to confirm that a url_ending
has been used, it works perfectly if the ending DOES exist in the database, however, if the link DOES NOT exist, then I receive a 500 error instead of a 404 Link does not exist
as mentioned in the Polr source code here
I ran this test on the official demo site Polr has: demo.polr.me
and this same API call returns a 404 (which is what I expect). Which leads me to believe it's an issue in this image, so I was wondering if anyone else had this problem?
I deployed on DigitalOcean with the following configuration setup using mysql
in another container on same host:
DB_HOST=MYHOST
DB_DATABASE=link
DB_USERNAME=root
DB_PASSWORD=MYSECRETPASSWORD
APP_ADDRESS=link.encoreapp.co
ADMIN_USERNAME=root
ADMIN_PASSWORD=MYSECRETPASSWORD
Here's the GET error I receive:
2021-03-13T05:24:39.865756513Z 10.0.1.14 - - [13/Mar/2021:05:24:39 +0000] "GET /api/v2/action/lookup?url_ending=test&key=MYAPIKEY HTTP/1.0" 500 4558 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "108.214.21.187" 0.081 0.080 . -
This 500 returns HTML and says: Whoops, looks like something went wrong.
No other help message unfortunately.
Can anyone else replicate?
Can I map the data volume for persistence? If so, can you give an example?
PHP7 is no longer in the default repos for alpine 3.16
There was an update of polr to vesion 2.3.0 which fixes a critical security issue. It would be nice if a new container would be pushed to https://hub.docker.com/r/ajanvier/polr with this update polr version.
polr exited with code 143
Just ran docker-compose up
and got this error.
Got the newest version (with the braclet) but it still doesnt quite work :c
Error:
[ReflectionException]
Class AdminSeeder does not exist
Tables are being created but obviously not the "admin" user.
The container currently does not run if a user is running the aforementioned versions of MariaDB.
It will result in the following error:
[PDOException]
SQLSTATE[HY000] General error: 1835 Malformed communication packet
[PDOException]
SQLSTATE[HY000] General error: 1835 Malformed communication packet
Updating...
[ErrorException]
get_headers(): php_network_getaddresses: getaddrinfo failed: Name does not resolve
[PDOException]
SQLSTATE[HY000] General error: 1835 Malformed communication packet
You can find more information regarding the bug here and here.
Looks like just rebuilding the container would force it to update to PHP 7.3 and resolve the issue, however, I noticed when attempting to do so that the container wouldn't start due to the wait-for-it.sh
script with the following error(s):
timeout: unrecognized option: t
BusyBox v1.31.1 () multi-call binary.
Usage: timeout [-s SIG] SECS PROG ARGS
Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Default SIG: TERM.
wait-for-it.sh: timeout occurred after waiting 120 seconds for mariadb:3306
wait-for-it.sh: strict mode, refusing to execute subprocess
timeout: unrecognized option: t
BusyBox v1.31.1 () multi-call binary.
Usage: timeout [-s SIG] SECS PROG ARGS
Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Default SIG: TERM.
wait-for-it.sh: timeout occurred after waiting 120 seconds for mariadb:3306
wait-for-it.sh: strict mode, refusing to execute subprocess
timeout: unrecognized option: t
BusyBox v1.31.1 () multi-call binary.
Usage: timeout [-s SIG] SECS PROG ARGS
Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Default SIG: TERM.
wait-for-it.sh: timeout occurred after waiting 120 seconds for mariadb:3306
wait-for-it.sh: strict mode, refusing to execute subprocess
Updating to the latest wait-for-it.sh
seems to resolve the issue, and doing so would result in another push to DockerHub which would in turn update PHP so I'll add a PR shortly to fix this.
Hi there.
Sadly there is an error when you start up the docker compose example of yours.
When I want to startup the file the following error is thrown:
[ReflectionException]
Class AdminSeeder does not exist
And of course I can't login afterwards :-)
Cheers
The current Dockerfile startup procedure does expect that there is already a database running.
If you try to run docker-compose
the service will fail as the initialization of the database takes longer then starting the polr container. Therefore the database does not get migrated with the correct tables if it is empty.
By using the wait-for-it.sh script to start /start.sh
in the ENTRYPOINT
, you could test if the port of the database is accessible.
I think running polr without a database is never possible? Therefore it should be always usful to check if the database is accessible.
Does this docker image support postgres?
docker logs show:
wait-for-it.sh: db:5432 is available after 0 seconds
[PDOException]
SQLSTATE[HY000] [2006] MySQL server has gone away
[PDOException]
PDO::__construct(): MySQL server has gone away
Hello,
I don't know how active you are on GitHub but it seems like Polr is not using the env variable APP_ADDRESS properly.
Let's say I am running this behing a reverse proxy to give it a domain name, so I have to use APP_ADDRESS.
When I click on a button like "About", the app name button or even just login, it is redirecting me to my localhost.
If I go to sub.domain.tld/admin I'm in the regular admin panel, but if you get redirected after clicking the login button it sends you to 127.0.0.1:(whatever port)
The links in the menu at the top right are using 443 (example.com:443/admin)
Setting the APP_PROTOCOL to http:// should fix this ?
I'm using the letsencrypt reverse proxy so I want the container to stay non-https and have the reverse proxy manage the security.
You enter the URL, click shorten and it should give you the shortened link.
A red error message appears in the top right corner, saying the link I am trying to shorten already appears to be already shortened. (tried many links from youtube, facebook, google, non work locally but they do in the demo)
Unaware what could be causing this. Tried on 3 different droplets.
Tired docker run and tried docker compose
docker-compose.ym
l Filedocker compose up
or
Digital Ocean Droplets
Chrome: Latest
Safari: Latest
Server: Ubuntu 18.4
Server 2: Linux Alpine Latest
Server 3: LAMP on Ubuntu 18.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.