A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

Overview

🐳 Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate 🐳

Edited from https://github.com/ger86/symfony-docker version -> https://github.com/ger86/symfony-docker/tree/fc89a899ac58fb1f6ee5758377c001ad4ef4f389

Description

docker_facebook_share

This is a complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

It is composed by 4 containers:

  • nginx, acting as the webserver.
  • php, the PHP-FPM container with the 7.4 PHPversion.
  • db which is the MySQL database container with a MySQL 8.0 image.
  • certbot generates the SSL certificate for your personal domain.

Installation

Docker Installation Illustration

  1. Clone this rep.

  2. Check that the dir. data/certbot/www/.well-known exist. If it is not, create it 😀 .

  3. Edit init with your domain and an email.

  4. Run ./init.

  5. Generate your Symfony proyecto goign to /data/php/symfony and running composer create-project symfony/skeleton NAME_OF_THE_PROJECT

  6. Edit data/nginx/web.conf with your domain and youdr proyect dir.

  7. Run docker-compose down

  8. Run docker-compose up -d

  9. The 4 containers are deployed:

Creating docker_db_1      ... done
Creating docker_php_1     ... done
Creating docker_nginx_1   ... done
Creating docker-certbot-1 ... done
  1. Remember to edit the env file at the root of the Symfony's project:
DATABASE_URL=mysql://db_user_name:db_user_pass@db:3306/db_name?serverVersion=5.7

Docker's useful commands

Docker Commands Illustration

  • Run Docker-compose: docker-compose up -d / docker-compose up

  • Check Docker-compose's volumens status: docker-compose ps -a

  • Check Docker's images: docker images -a

  • Remove Docker's images: docker rmi -f imageID1 imageID2 ... (-f = force)

  • Enter to a Docker's volumen: docker-compose exec VolumenID sh / docker-compose exec VolumenID bash

  • Copy a file to the docker we want to: docker cp file docker_id:/dir

  • Remove all unused containers, volumes, networks and images: docker system prune

You might also like...
WebAgency certificate results done by Mickaël Moreau, delivred by Axelo (web-agency.app)

WebAgencyCertificate WebAgency certificate results done by Mickaël Moreau, delivred by Axelo (web-agency.app) Résultat du certificat en pré-production

Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

This package provides a set of factories to be used with containers using the PSR-11 standard for an easy Doctrine integration in a project

psr-container-doctrine: Doctrine Factories for PSR-11 Containers Doctrine factories for PSR-11 containers. This package provides a set of factories to

Sanitize untrustworthy HTML user input (Symfony integration for https://github.com/tgalopin/html-sanitizer)

html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users (who you cannot trust), allowing you to store it and display it safely. It has sensible defaults to provide a great developer experience while still being entierely configurable.

Dockerise Symfony Application (Symfony 6 + Clean Architecture+ DDD+ CQRS + Docker + Xdebug + PHPUnit + Doctrine ORM + JWT Auth + Static analysis)

Symfony Dockerise Symfony Application Install Docker Install Docker Compose Docker PHP & Nginx Create Symfony Application Debugging Install Xdebug Con

This repository aims to build a fairly complete CI/CD example using GitHub workflows and actions.
This repository aims to build a fairly complete CI/CD example using GitHub workflows and actions.

CI/CD example This repository aims to build a fairly complete CI/CD example using GitHub workflows and actions. Keep in mind that the toolset used in

🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

 A complete solution for group projects in organizations that lets you track your work in any scenario. Working in a team is a cumbersome task, ease it using our project management system.
A complete solution for group projects in organizations that lets you track your work in any scenario. Working in a team is a cumbersome task, ease it using our project management system.

SE-Project-Group24 What is Evolo? Evolo is Dashboard based Project Management System. A complete solution for group projects in organizations that let

Magento 2 Italian Language Pack is special gift for Magento 2 Community Edition. The data of the translation is supplied by Magento 2 Translation Project of Crowdin site, on which you will contribute into the project and download the zip file to install on your own store. This knowledge base will include full of the clear guides that supports you to convert the default language (English) into Italian language on your entire store.
Owner
null
Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

Meanbee 454 Dec 27, 2022
Quick start Symfony 5 project via docker-compose

Quick Docker Symfony This repository will allow you to start a Symfony project very quickly with PostgreSQL 14, pgAdmin 4 and one of three php version

null 2 Aug 7, 2022
All about docker projects either from dockerfile or compose. Anyway, here the project is in the form of a service, for the programming language I will make it later

Docker Project by ItsArul Hey, yo guys okay, this time I made some projects from Docker. Anyway, this project is open source, for example, if you want

Kiyo 10 Nov 4, 2022
Magento 2.4.4 CE docker compose

REQUIREMENTS Docker https://docs.docker.com/desktop/install/windows-install/ Git https://git-scm.com/download/win STOP LOCAL SERVERS (XAMPP, OPENSERVE

null 5 Sep 11, 2022
Easily install PHP extension in Docker containers

Easy installation of PHP extensions in official PHP Docker images This repository contains a script that can be used to easily install a PHP extension

Michele Locati 2.8k Jan 4, 2023
A Magento Development Environment Made of Docker Containers

Docker for Magento 1 Extension Development Tl;dr How do I use this? Clone it. Type docker-compose up -d. Install a Magento Mount your file share. Deve

Michael A. Smith 99 May 10, 2021
OSX/Linux Docker containers installer for Magento 2

Magento 2 OSX/Linux Docker Requirements MacOS: Docker, docker-sync, Git Linux: Docker, Docker-compose, Git on Debian based OS (Example: Ubuntu, Linux

Osiozekhai Aliu 54 Dec 10, 2022
Running Laravel and React stacks together using Vite and InertiaJS on Docker.

Laravel-Vite-Docker Running Laravel and React stacks together using Vite and InertiaJS on Docker. Explore project's blog » Report Bug · Request Featur

Elvin Lari 6 Dec 22, 2022
Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.

Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.

scotch 2.7k Jan 8, 2023
A simple e-Certificate generator.

SeaJell A simple e-Certificate Generator. Guides You can read all the guides in using the system from the documentation. License Copyright (c) Muhamma

The SeaJell Project 22 Oct 4, 2022