Skip to main content


Has anyone tried to run #GNUSocial in #Docker recently? I followed these steps, by the way.

Aside from an error complaining that vendor/autoload.php is missing, I was getting this logging constantly when running `docker compose up`:

gnu-social-worker-1   | Fatal error: Uncaught LogicException: You need to add "symfony/framework-bundle" as a Composer dependency. in /var/www/social/bin/console:18
gnu-social-worker-1   | Stack trace:
gnu-social-worker-1   | #0 {main}
gnu-social-worker-1   |   thrown in /var/www/social/bin/console on line 18

#Fediverse #Mastodon
in reply to Neil E. Hodges

It looks like it's already in composer.json and composer.lock:
composer.json:    "symfony/framework-bundle": "^6",
composer.lock:                "symfony/framework-bundle": "^3.4.30|^4.3.3|^5.0|^6.0",
composer.lock:                "symfony/framework-bundle": "~3.4|~4.0|~5.0|~6.0"
composer.lock:                "symfony/framework-bundle": "^5.4|^6.0",
composer.lock:                "symfony/framework-bundle": "^4.4|^5.3|^6.0",
composer.lock:                "symfony/framework-bundle": "^4.4|^5.0|^6.0",
composer.lock:                "symfony/framework-bundle": "<5.4",
composer.lock:            "name": "symfony/framework-bundle",
composer.lock:                "url": "https://github.com/symfony/framework-bundle.git",
composer.lock:                "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/b79e5866a8293de00c8436836c2038ec31916ee7",
composer.lock:                "source": "https://github.com/symfony/framework-bundle/tree/v6.1.6"
composer.lock:                "symfony/framework-bundle": "<5.4",
composer.lock:                "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
composer.lock:                "symfony/framework-bundle": "<5.4",
composer.lock:                "symfony/framework-bundle": "^5.4|^6.0",
composer.lock:                "symfony/framework-bundle": "<5.4",
composer.lock:                "symfony/framework-bundle": "^5.4|^6.0",
composer.lock:                "symfony/framework-bundle": "<4.4",
composer.lock:                "symfony/framework-bundle": "^4.4 | ^5.0 | ^6.0",
composer.lock:                "symfony/framework-bundle": "^5.4 | ^6.0",
composer.lock:                "symfony/framework-bundle": "^3.4|^4.0|^5.0|^6.0",
composer.lock:                "symfony/framework-bundle": "^5.4|^6.0"
composer.lock:                "symfony/framework-bundle": "^4.4|^5.0|^6.0",
composer.lock:                "symfony/framework-bundle": "^5.4.7|^6.0",
composer.lock:                "symfony/framework-bundle": "^5.4|^6.0",

#PHP
#php
in reply to Neil E. Hodges

what does your Dockerfile look like? Or is your Compose service pointing to a built image on hub.docker.com?
in reply to Matthew Miller :donor:

Here is the docker-compose.yml that bin/configure generated:
version: '3'

services:
    nginx:
        image: nginx:alpine
        depends_on:
            - php
        restart: always
        tty: false
        ports:
            - "80:80"
            - "443:443"
        volumes:
            # Nginx
            - ./docker/nginx/nginx.conf:/var/nginx/social.conf
            - ./docker/nginx/domain.sh:/var/nginx/domain.sh
            # Certbot
            - ./docker/certbot/www:/var/www/certbot
            - ./docker/certbot/.files:/etc/letsencrypt
            # social
            - ./public:/var/www/social/public
        env_file:
            - ./docker/bootstrap/bootstrap.env
            - ./docker/db/db.env
        command: /bin/sh -c '/var/nginx/domain.sh;
                             while :; do
                                 sleep 6h & wait $${!};
                                 nginx -s reload;
                             done &
                             nginx -g "daemon off;"'

    certbot:
        image: certbot/certbot
        # Check for certificate renewal every 12h as
        # recommended by Let's Encrypt
        entrypoint: /bin/sh -c 'trap exit TERM;
                                while :; do
                                    certbot renew > /dev/null;
                                    sleep 12h & wait $${!};
                                done'
        volumes:
          - ./docker/certbot/www:/var/www/certbot
          - ./docker/certbot/.files:/etc/letsencrypt

    php:
        build: docker/php
        restart: always
        tty: true
        ports:
            - 9000:9000
        volumes:
            # Entrypoint
            - ./docker/php/entrypoint.sh:/entrypoint.sh
            - ./docker/db/wait_for_db.sh:/wait_for_db.sh
            - ./docker/social/install.sh:/var/entrypoint.d/social_install.sh
            # Main files
            - .:/var/www/social
            - /var/www/social/docker # exclude docker folder
        env_file:
            - ./docker/social/social.env
            - ./docker/db/db.env
        command: /entrypoint.sh

    db:
        image: postgres:alpine
        restart: always
        tty: false
        ports:
            - 5432:5432
        environment:
            - PGDATA=/var/lib/postgres/data
        env_file:
            - ./docker/db/db.env
        volumes:
            - database:/var/lib/postgres/data

    redis:
        image: redis:alpine
        restart: always
        tty: false
        volumes:
            - ./docker/redis/redis.conf:/etc/redis/redis.conf
        ports:
            - 6379:6379
        command: redis-server /etc/redis/redis.conf

    worker:
        build: docker/php
        restart: always
        tty: true
        volumes:
            # Entrypoint
            - ./docker/php/entrypoint.sh:/entrypoint.sh
            - ./docker/db/wait_for_db.sh:/wait_for_db.sh
            - ./docker/social/install.sh:/var/entrypoint.d/social_install.sh
            - ./docker/worker/worker.sh:/var/entrypoint.d/social_worker.sh
            # Main files
            - .:/var/www/social
            - /var/www/social/docker # exclude docker folder
        env_file:
            - ./docker/social/social.env
            - ./docker/db/db.env
        command: /entrypoint.sh

volumes:
    database:
in reply to Neil E. Hodges

Hmm, you didn't make any changes after running bin/configure? Nothing looks immediately off, was "symfony/framework-bundle" already in composer.json or did you add it?