https://github.com/zoispag/dockerize_php
Opinionated ready-to-use docker for PHP (Laravel) apps
https://github.com/zoispag/dockerize_php
docker docker-compose docker-container laravel mailcatcher mysql nodejs php
Last synced: 3 months ago
JSON representation
Opinionated ready-to-use docker for PHP (Laravel) apps
- Host: GitHub
- URL: https://github.com/zoispag/dockerize_php
- Owner: zoispag
- Created: 2018-08-31T06:40:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-14T06:56:36.000Z (over 7 years ago)
- Last Synced: 2025-05-30T02:23:47.329Z (about 1 year ago)
- Topics: docker, docker-compose, docker-container, laravel, mailcatcher, mysql, nodejs, php
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker for PHP
> Opinionated ready-to-use docker for PHP (Laravel) apps
### Contains:
- nginx
- php-fpm (php 7.2)
- mysql 5.6
- mailcatcher
- composer
- node.js
- php extensions: mysql & sqlite3
### Env variables:
- Set APP_PORT to access the app from `localhost:MYSQL_PORT`
- Set MYSQL_PORT to access the sql database with SequelPro with `host = localhost` and `port = MYSQL_PORT`
### Setup:
- Put your PHP app inside the `workspace` dir
- `cd deployment && cp .env.example .env`
- Set your environment variables
- Execute `docker-compose build` from the `deployment` dir
- Once finished, run `docker-compose up -d` to start the containers
- First time run will take longer (some images will have to download)
#### Useful aliases:
```
dup='docker-compose up -d'
ddown='docker-compose down'
dps='docker-compose ps'
drr='ddown && dup'
dphp='docker exec -it php-server /bin/bash'
```