Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmedraafat14/symfony4_dockrized
🐳 Docker containers with NGINX, PHP73-FPM, MYSQl, & Symfony 4.4
https://github.com/ahmedraafat14/symfony4_dockrized
docker docker-compose-template docker-containers nginx-docker php php7 php73-fpm symfony symfony4
Last synced: 4 days ago
JSON representation
🐳 Docker containers with NGINX, PHP73-FPM, MYSQl, & Symfony 4.4
- Host: GitHub
- URL: https://github.com/ahmedraafat14/symfony4_dockrized
- Owner: AhmedRaafat14
- Created: 2019-12-13T08:25:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-13T17:56:55.000Z (about 5 years ago)
- Last Synced: 2024-11-20T00:50:06.575Z (2 months ago)
- Topics: docker, docker-compose-template, docker-containers, nginx-docker, php, php7, php73-fpm, symfony, symfony4
- Language: Dockerfile
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Symfony 4.4 on Docker
Install Symfony 4.4 on containers.### Requirements:
* Docker### Usage:
* Clone this repository:
```bash
$ git clone https://github.com/AhmedRaafat14/symfony4_dockrized.git
```* If you already have a symfony project you want to use, just comment the following lines and update the paths in all files from `/var/www/dashboard` to `/var/www/your_project_name`. OR just change from `website-skeleton` to normal `symfony` package.
```docker
# docker/php-fpm/Dockerfile
WORKDIR /var/www
RUN composer create-project symfony/website-skeleton:^4.4 dashboard
# RUN composer create-project symfony/skeleton:^4.4 dashboard
```
* You can also add volumes for your project folder in the `docker-compose` file.
```docker
# docker-compose.yml
php:
volumes:
- ./your_project_name:/var/www/your_project_name
```
```docker
# docker-compose.yml
nginx:
volumes:
- ./your_project_name:/var/www/your_project_name```
> files to change the relative path in is: `docker/nginx/{Dockerfile, sites}` & `docker/php-fpm/Dockerfile`* Go to the repo directory and run `docker-compose`. (Make sure you have docker up & running).
```bash
$ cd symfony4_dockrized
$ docker-compose up -d --build
```* You can check the up & running containers if everything went fine:
```bash
$ docker ps
```* To check your application is up and running go to http://localhost/, you will see there a the welcome page.
### Usfual commands:
* Clear the cache of the application, specially when you change the twig templates (make sure you inside the symfony4_dockrized directory)
```bash
$ docker-compose exec php bin/console cache:clear -e prod
$ docker-compose exec php chmod 777 -R var/cache
```
* Install a new package:
```bash
$ docker-compose exec php composer require symfony/maker-bundle --dev
```#### Now Enjoy Developing :dancer: