Comments (15)
After a little more investigation, the problem seems to be that crond cannot access the environment variables for the database user and password. They are not available when crond executes the job.
from docker-phpipam.
@Fail-Unsafe Thanks for filing this. I will look into this as soon as I have the chance. If you can provide as much detail that would be great.
from docker-phpipam.
I'm not that well versed in Docker so I'm not sure how exactly Docker passes in the environment variables. The cronjobs work e.g. when you modify config.php to use static values instead of getenv(...)
The cronjob probably has to look something like this
MYSQL_DB_HOSTNAME="mariadb"
MYSQL_DB_NAME="phpipam"
MYSQL_DB_PASSWORD="phpipam"
MYSQL_DB_PORT="3306"
MYSQL_DB_USERNAME="phpipam"
*/15 * * * * /usr/local/bin/php /usr/local/www/phpipam/functions/scripts/pingCheck.php
We need a way to access those environment variables in a dynamic way.
from docker-phpipam.
No worries at all. Thanks for the good info you already provided. Let me see what I can figure out. It has been quite a while since I have used this so it might take me some time.
from docker-phpipam.
Did you build the Docker
image from this repo or leverage the already built Docker
image mrlesmithjr/docker-phpipam
?
from docker-phpipam.
I use the mrlesmithjr/docker-phpipam image straight from Docker Hub.
from docker-phpipam.
Awesome. And thanks!
from docker-phpipam.
Another thought. Have you attempted my docker-ansible-phpipam repo?
from docker-phpipam.
Not yet. I was looking for an image that already includes the necessary cronjobs. Is this an improved version of the other image?
from docker-phpipam.
Yeah that image was one that was created after this repo. It does include the cronjobs as well so it might be worthwhile to test it out as well.
from docker-phpipam.
I did try your image but at first encountered a problem regarding our proxy. I've have passed in our proxy as an environment variable and then it worked.
Before that it was stuck at "apk update" and parts of the playbook.
Is there a way to change the interval of the cronjob? Maybe a possibility to pass in the interval as an environment variable through a jinja2 template?
We have almost 100 subnets...the scanning takes too long for a 15min interval.
from docker-phpipam.
Awesome! The current method of changing the cronjob would be by editing the following cron
tasks and then building the image from scratch. I can definitely look into the option of adding this as a passable variable for the longterm if that makes sense.
from docker-phpipam.
I forked your repo and tried to make the necessary modifications but failed. I moved the creation of the parameterized cronjobs from playbook.yml to phpipam-entrypoint.yml but when the container starts the playbook is never executed it seems.
from docker-phpipam.
let's open up a discussion on https://github.com/mrlesmithjr/docker-ansible-phpipam and see if we can get this worked out for you.
from docker-phpipam.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from docker-phpipam.
Related Issues (3)
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 docker-phpipam.