Giter Site home page Giter Site logo

Comments (6)

zauberstuhl avatar zauberstuhl commented on June 11, 2024 1

FYI it worked for me after I added:

[system]
pidfile = "/var/run/friendica.pid"

to config/local.ini.php

from docker.

zauberstuhl avatar zauberstuhl commented on June 11, 2024 1

@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.

nupplaphil avatar nupplaphil commented on June 11, 2024 1

So I'm closing this issue :)

from docker.

nupplaphil avatar nupplaphil commented on June 11, 2024

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.

noplanman avatar noplanman commented on June 11, 2024

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.

iannuzzelli avatar iannuzzelli commented on June 11, 2024

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)

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.