Dockerized Symfony 6.4 project boilerplate — Stable…
    Neura MarketNeura Market/Stable Diffusion
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityStable DiffusionStable Diffusion
    DeepSeekDeepSeekCoPilotCoPilotMidjourneyMidjourney
    View All Directories
    OverviewPromptsBlogVideosGuidesCoursesCommunityModelsLoRAsComfyUI WorkflowsTrending
    Stable DiffusionBlogDockerized Symfony 6.4 project boilerplate
    Back to Blog
    Dockerized Symfony 6.4 project boilerplate
    backend

    Dockerized Symfony 6.4 project boilerplate

    Nicolas Bonnici May 8, 2026
    0 views

    > Repository and post updated September 22 2024 The perfect Dockerized Symfony 6.4 boilerplate...

    Repository and post updated September 22 2024

    The perfect Dockerized Symfony 6.4 boilerplate doesn't exists... But wait, what if I create and share my own vision of it?!!

    Image description

    Leggooo

    We gonna build a classic stack that i personaly love, with such cutting edge technologies like PostgreSQL 16, Redis and Nginx HTTP server and also PHP 8.3 and FPM and Symfony framwork in LTS version 6.4.

    First of all, I want something really easy to use, so let's leverage docker compose plugin without any extra argument to start and initialize all needed containers.

    composer setup
    

    Project treeview

    • logs
    • docker
    • symfony

    Everything is at project root to do so, no fancy parameter needed since everything use default project path convention.

    Simply 3 folders, the first one "docker/" to store all Docker related configurations, one other "logs/" for the whole containers logs and a "symfony/" last one directory to put your Symfony project's source code.

    Go further

    Good but wait I have other developers to sync in that project and do they can scaffold it on their local development env without knowing any clue about Symfony and server side development or never work on containerized projects?

    Image description

    Nope just kidding, ain't no voodoo involved in that process, we're not gonna reinvent the wheel and make a revolution. Not at all, just a simple leverage of composer and more specially his scripts section.

    Image description

    Ok if you don't rage quit this post or punch directly your screen you'll enjoy a little magic, with this simple one line command to run all needed containers then setup the database, create the data model before populating it if you agree the prompt by responding "yes" at the end.

    All that using one dead simple command:

    composer setup
    

    Explanation we first build and launch all needed containers, the run them in demon mode, this the first part of the command: docker compose up --build -d. The second part will then run the "install-project" composer script. See the symfony/composer.json "scripts" section.

    {
        "scripts": {
            ...
            "setup": [
                "composer run up",
                "composer run deps:install",
                "composer run database",
                "composer run migrate",
                "composer run fixtures"
            ],
            "up": [
                "docker compose --env-file symfony/.env up -d --build"
            ],
            "down": [
                "docker compose --env-file symfony/.env down"
            ],
            "stop": [
                "docker compose --env-file symfony/.env stop"
            ],
            "build": [
                "docker compose --env-file symfony/.env build"
            ],
            "deps:install": [
                "docker exec -it php-fpm bin/composer install -o"
            ],
            "database": [
                "docker exec -it php-fpm bin/console doctrine:database:create -n --if-not-exists",
                "docker exec -it php-fpm bin/console doctrine:database:create -n --if-not-exists --env=test"
            ],
            "migrate": [
                "docker exec -it php-fpm bin/console doctrine:migration:migrate -n",
                "docker exec -it php-fpm bin/console doctrine:migration:migrate -n --env=test"
            ],
            "fixtures": [
                "docker exec -it php-fpm bin/console doctrine:fixtures:load -n",
                "docker exec -it php-fpm bin/console doctrine:fixtures:load -n --env=test"
            ],
            "tests": [
                "docker exec -t php-fpm bash -c 'clear && ./vendor/bin/phpunit --testdox --exclude=smoke'"
            ],
            "lint": [
                "docker exec -t php-fpm ./vendor/bin/php-cs-fixer ./src/"
            ],
            "lint:fix": [
                "docker exec -t php-fpm ./vendor/bin/php-cs-fixer fix ./src/"
            ],
            "db": [
                "psql postgresql://postgres:[email protected]:15432/dbtest"
            ],
            "logs": [
                "docker compose logs -f"
            ],
            "cache-clear": [
                "docker exec -t php-fpm bin/console c:c"
            ]
        }
    }
    

    It will first install all needed composer dependencies and optimize classes autoloader. Then execute migrations up to the latest version then populate database with fixtures respectively with "doctrine/doctrine-migrations-bundle" and "doctrine/doctrine-fixtures-bundle" bundles.

    The actual composer scripts available:

    composer [
        setup
        up
        stop
        build
        deps:install
        database
        migrate
        fixtures
        tests: launch phpunit tests suite
        lint
        db: connect to database container via CLI client 
        logs: show containers logs
        cache-clear
    ]
    

    Talk is cheap, show me the code

    Linus Torvalds famous quote: Talk is cheap, show me the code

    Feel free to fork, contribute and maintain this boilerplate using this Gitlab repository: nicolasbonnici/symfony-docker-boilerplate

    Tags

    backenddockerphpshowdev

    Comments

    More Blog

    View all
    Context bankruptcy: The case for strategic forgetting for AI Agentsai

    Context bankruptcy: The case for strategic forgetting for AI Agents

    Most of us have seen a coding agent fail to complete a task we know it can do. We just don't...

    J
    James O'Reilly
    Parallel Compliance Engine: Drive-to-Sheets Multi-Agent Orchestrationgooglecloud

    Parallel Compliance Engine: Drive-to-Sheets Multi-Agent Orchestration

    When building Generative AI applications, developers often encounter a massive bottleneck: sequential...

    A
    Aryan Irani
    Is It Ethical to Post and Ask About Circuits on Dev.to?discuss

    Is It Ethical to Post and Ask About Circuits on Dev.to?

    I’ve been thinking about sharing some electronic circuit posts on Dev.to — small circuits, DIY...

    C
    codebunny20
    The One-Click Exporter: AI Studio Antigravity, Probed to Its Limitsagents

    The One-Click Exporter: AI Studio Antigravity, Probed to Its Limits

    What nobody tells you about exporting your multi-agent prototype to a local workspace. Every...

    L
    leslysandra
    Guarding the till while autonomous data agents do the diggingagenticarchitect

    Guarding the till while autonomous data agents do the digging

    Autonomous agents are genuinely good at answering messy business questions. Give one an LLM and a set...

    S
    Sireesha Pulipati
    Return on Attention: Why AI Code Reviews Are Wearing Us Outai

    Return on Attention: Why AI Code Reviews Are Wearing Us Out

    PR volume went up, ticket quality didn't, and the gap got filled with LLMs on both sides of the review: bots reviewing, bots replying, bots occasionally arguing with bots about priorities that only existed in a teammate's head. Our CEO named the actual problem, and it's bigger than code review.

    C
    christine

    Stay up to date

    Get the latest Stable Diffusion prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Stable Diffusion and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Stable Diffusion resource

    • Get Details of a GitLab Repositoryn8n · $12.99 · Related topic
    • Automated Backup of Workflows to Gitea Repositoryn8n · $12.85 · Related topic
    • Automated Light Control on GitHub Repository Updatesn8n · $8.11 · Related topic
    • Get Community Profile of a GitHub Repositoryn8n · $6.99 · Related topic
    Browse all workflows