{"id":22781505,"url":"https://github.com/inushin/dockersymfonyssl","last_synced_at":"2025-10-26T01:37:11.010Z","repository":{"id":158754795,"uuid":"422333097","full_name":"Inushin/dockerSymfonySSL","owner":"Inushin","description":"A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.","archived":false,"fork":false,"pushed_at":"2022-12-29T11:30:26.000Z","size":80,"stargazers_count":6,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T16:34:12.287Z","etag":null,"topics":["certbot-ssl","docker","docker-certbot","docker-compose","docker-mysql","docker-php","docker-symfony","https","mysql","php","php74-fpm","symfony5"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inushin.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-28T19:36:13.000Z","updated_at":"2024-10-26T07:50:44.000Z","dependencies_parsed_at":"2023-08-25T01:40:51.621Z","dependency_job_id":null,"html_url":"https://github.com/Inushin/dockerSymfonySSL","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Inushin/dockerSymfonySSL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerSymfonySSL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerSymfonySSL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerSymfonySSL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerSymfonySSL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inushin","download_url":"https://codeload.github.com/Inushin/dockerSymfonySSL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerSymfonySSL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281047794,"owners_count":26435124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certbot-ssl","docker","docker-certbot","docker-compose","docker-mysql","docker-php","docker-symfony","https","mysql","php","php74-fpm","symfony5"],"created_at":"2024-12-11T21:07:37.546Z","updated_at":"2025-10-26T01:37:11.005Z","avatar_url":"https://github.com/Inushin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐳 Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate 🐳\n\n![symfony_logo](https://user-images.githubusercontent.com/57062736/151140439-1c8af7c8-5905-4a6f-a846-d988643ee76f.png)\n\nIf you find this useful, remember about giving a start ⭐ to this repo or share it 🔁\n\nEdited from `https://github.com/ger86/symfony-docker` version -\u003e `https://github.com/ger86/symfony-docker/tree/fc89a899ac58fb1f6ee5758377c001ad4ef4f389`\n\n## Description 📋\n\n![docker_facebook_share](https://user-images.githubusercontent.com/57062736/139103227-36f3cb32-c3c1-4158-b99e-25a31e955f44.png)\n\nThis is a complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.\n\nIt is composed by 4 containers:\n\n- `nginx`, acting as the webserver.\n- `php`, the PHP-FPM container with the 7.4 PHPversion.\n- `mysql` which is the MySQL database container with a **MySQL 8.0** image.\n- `certbot` generates the SSL certificate for your personal domain.\n\n## Installation ⌨\n\n![Docker Installation Illustration](https://user-images.githubusercontent.com/57062736/139102730-d6f51d53-ffb3-44bb-be5e-2bdf48d91295.png)\n\n0. You need ****Docker**** and ****Docker-compose**** where you are going to launch this so, if you do not have it... click [HERE](https://github.com/Inushin/dockerSymfonySSL#installing-docker-docker-compose-and-composer) or go to the end of this `.md` ^^\n\n1. Clone this rep.\n\n2. Check that the dir. `data/certbot/www/.well-known` exist. If it is not, create it 😀.\n\n3. Edit `init` with your domain and an email.\n\n4. Edit the `docker-compose.yml` with your DB information. \n\n5. Run `./init`.\n\n6. Generate your Symfony proyect going to the php container `docker-compose exec php bash`. Then, go to symfony folder, `/var/www/certbot/phpDir`, and run `composer create-project symfony/skeleton NAME_OF_THE_PROJECT`. If you need to install **Composer** click [HERE](https://github.com/Inushin/dockerSymfonySSL#installing-docker-docker-compose-and-composer) or go to the end of this `.md` ^^\n\n7. Edit `data/nginx/web.conf` with your domain and your project dir.\n\n8. Run `docker-compose down`\n\n9. Run `docker-compose up -d`\n\n10. The 4 containers are deployed: \n\n```\nCreating docker_db_1      ... done\nCreating docker_php_1     ... done\nCreating docker_nginx_1   ... done\nCreating docker-certbot-1 ... done\n```\n\n11. Remember to edit the `env` file at the root of the Symfony's project. `mysql` is the name of the container that has your database:\n```\nDATABASE_URL=mysql://db_user_name:db_user_pass@mysql:3306/db_name?serverVersion=5.7\n```\n\n\n## Docker's useful commands 📑\n![Docker Commands Illustration](https://user-images.githubusercontent.com/57062736/139102966-25f28be1-f768-49bd-a8a1-915a8465de9e.png)\n\n\n- Run Docker-compose: `docker-compose up -d` / `docker-compose up`\n\n- Check Docker-compose's volumens status: `docker-compose ps -a` / `docker-compose ps`\n\n- Check Docker's images: `docker images -a`\n\n- Remove Docker's images: `docker rmi -f imageID1 imageID2 ...` (-f = force)\n\n- Enter to a Docker's volumen: `docker-compose exec VolumenID sh` / `docker-compose exec VolumenID bash`\n\n- Copy a file to the docker we want to: `docker cp file docker_id:/dir`\n\n- Remove all dangling (not tagged or associated with a container) containers, volumes, networks and images: `docker system prune`\n\n- Remove all unused containers and images with at least one container associated to them: `docker system prune -a`\n\n- Shows all unused local images: `docker images ls -f dangling=true`\n\n- Shows all unused local volumes: `docker volume ls -f dangling=true`\n\n- Remove all local volumes not used by at least one container: `docker volume prune`\n\n## Installing Docker, Docker-compose and Composer 🛠\n![Docker-composer](https://user-images.githubusercontent.com/57062736/141182130-b8ed2d7a-9a68-4387-b838-ba0d44bb4e0e.png)\n\n**Adjust the installation to your OS. Here you have the one for EC2(AWS) with CentOS**\n#\n- Docker installation\n\n1. Download and install Docker: `yum install docker`\n\n2. Gives permisions so you can run it everywhere: `usermod -a -G docker ec2-user`\n\n3. Starts Docker's service: `service docker start`\n\n4. Starts Docker's service each time you run the SO: `chkconfig docker on`\n#\n- Docker-compose installation\n\n1. Download and install Docker-compose: `curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose`\n\n2. Make it executable from anywhere: `chmod +x /usr/local/bin/docker-compose`\n\n3. Makes an direct access for docker-compose: `ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose`\n\n4. Check the version and the installation: `docker-compose --version`\n\n#\n- Composer installation\n\n\n1. Download and install Composer: `curl -sS https://getcomposer.org/installer | php`\n\n2. Moves the config file to the composer dir: `mv composer.phar /usr/local/bin/composer`\n\n3. Makes an direct access of `composer.phar` file: `ln -s /usr/local/bin/composer /usr/bin/composer`\n\n## ⭐ Feedback and bugs 🐞\n\nIf you find any bug or just want to give your feedback (remember the ⭐ ^^), **Feel free to do it**. I am, like you, constantly learning and things change so quickly that... no one knows ^^\n\n## Version control 📝\n\n- 1.0 - Adding the Version Control zone - 08/02/2022\n- 1.1 - Updated useful Docker commands - 10/02/2022\n- [v2.0 - Current](https://github.com/Inushin/dockerSymfonySSL/tree/v2.0) - Add new volume to NGINX with web files \u0026 Remove unneeded files and directories - 9/11/2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finushin%2Fdockersymfonyssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finushin%2Fdockersymfonyssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finushin%2Fdockersymfonyssl/lists"}