GithubHelp home page GithubHelp logo

iambrennanwalsh / symfony-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ger86/symfony-docker

0.0 0.0 0.0 12.42 MB

This is a complete stack for running Symfony 6 with PHP-FPM 8.1 and MySQL 8 into Docker containers using docker-compose tool.

License: GNU General Public License v3.0

Shell 35.53% PHP 39.92% Dockerfile 24.55%

symfony-docker's Introduction

๐Ÿณ Docker + PHP 8.1 + MySQL + Nginx + Symfony 6.1 Boilerplate

Description

This is a complete stack for running Symfony 6.1 into Docker containers using docker-compose tool with docker-sync library.

It is composed by 4 containers:

  • nginx, acting as the webserver.
  • php, the PHP-FPM container with the 8.0 version of PHP.
  • db which is the MySQL database container with a MySQL 8.0 image.
  • symfony_docker_app_sync to sync files using library docker-sync .

Installation

  1. ๐Ÿ˜€ Clone this rep.

  2. Create the file ./.docker/.env.nginx.local using ./.docker/.env.nginx as template. The value of the variable NGINX_BACKEND_DOMAIN is the server_name used in NGINX.

  3. Go inside folder ./docker and run docker-sync-stack start to start containers.

  4. You should work inside the php container. This project is configured to work with Remote Container extension for Visual Studio Code, so you could run Reopen in container command after open the project.

  5. Inside the php container, run composer install to install dependencies from /var/www/symfony folder.

  6. Use the following value for the DATABASE_URL environment variable:

DATABASE_URL=mysql://app_user:helloworld@db:3306/app_db?serverVersion=8.0.23

You could change the name, user and password of the database in the env file at the root of the project.

To learn more

I have recorded a Youtube session explaining the different parts of this project. You could see it here:

Boilerplate para Symfony basado en Docker, NGINX y PHP8

symfony-docker's People

Contributors

ger86 avatar

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.