Comments (6)
FYI it worked for me after I added:
[system]
pidfile = "/var/run/friendica.pid"
to config/local.ini.php
from docker.
@noplanman the cron.sh starts a daemon script. if you want everything in one container it might make sense to alter the entrypoint and start the workers permanently via:
php /var/www/html/bin/daemon.php -f start
Then you have no host dependencies.
from docker.
- The Zombie issue is resolved by using
gosu
andtini
, changed #162 - it never happened again since this change - The
pidfile
is now part of the core config, so no need to add it extra (https://github.com/friendica/docker/blob/stable/.config/zz-docker.config.php#L13)
So I'm closing this issue :)
from docker.
Did you use some of the .examples
as baseline? Can you paste your docker-compose.yml
if possible or the startup environment variables.
Is the "normal" Friendica node working? Can you see the page? Is Friendica already installed?
this one is my configuration, which is working.
.env
- File
# ------------------------------
# friendica configuration
# ------------------------------
# example.org is _not_ a valid hostname, use a fqdn here.
HOSTNAME=friendica.philipp.info
# ------------------------------
# SQL database configuration
# ------------------------------
DBUSER=********
DBDATA=********
DBHOST=db
DBPORT=3306
# Please use long, random alphanumeric strings (A-Za-z0-9)
DBPASS=***********
SITENAME="Philipp.info Friendica"
docker-compose.yml
version: '2.1'
services:
cron:
image: friendica/server:dev-fpm-alpine
restart: always
volumes:
- friendica-vol-1:/var/www/html
environment:
- SITENAME=${SITENAME}
- SMTP=smtp.philipp.info
depends_on:
- db
- redis
entrypoint: /cron.sh
hostname: friendica.philipp.info
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
from docker.
I've just opted to set a cronjob in the host machine, instead of a second container:
*/10 * * * * root /usr/bin/docker exec -u www-data friendica php bin/worker.php
Not sure how "good" or "bad" this is, but it's been working super smooth since the very beginning
from docker.
I had a very similar issue and ended up creating the cronjob in the host as suggested by @noplanman , although not nice as it creates a dependency in case of future scaling needs.
In my current setup (using friendica:2020.03-apache
image), the cron container, despite being passed the same env file of the friendica app, doesn't start the daemon, it just hangs reporting this warning
[WARN tini (253)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
then it tries to send the error notification via email, using the wrong SMTP (I believe that's because the SMTP env variables are not parsed by cron.sh, which is probably a separate issue)
from docker.
Related Issues (20)
- Cron job with k3s acting funny HOT 2
- Error: GNU Multiple Precision PHP module required but not installed. HOT 3
- E_WARNING: session_write_close() with Redis HOT 2
- How to check cron jobs? HOT 1
- db.env variables are incorrect HOT 2
- ImagickException: Unable to set the image format HOT 6
- Link in README.md is broken HOT 1
- Wrong sitename and description on Friendica Directory https://dir.friendica.social/ HOT 1
- Healthcheck HOT 3
- Can't turn off STARTTLS for msmtp
- Lots of CORS errors when using the insecure image HOT 4
- Help on running Friendica on Kubernetes HOT 2
- Issues with HTTPS HOT 9
- FRIENDICA_UPGRADE cannot be false on rc image HOT 2
- Reduce PHP error_reporting scope in container HOT 8
- Failed to open stream: No such file or directory in /var/www/html/vendor/composer/ClassLoader.php on line 444 HOT 1
- PHP Module IntlChar is missing HOT 8
- Improve documentation on attaching MySQL database HOT 1
- 2024.03-rc image is missing HOT 8
- Production ready Docker image for Kubernetes
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.