Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.env
/.env
/docker-compose.override.yml
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ script:
- export MYSQL_ROOT_PASSWORD=root
- cp .env.dist .env
- XDEBUG=1 docker-compose build
- ln -sr docker-compose.dev.yml docker-compose.override.yml
- docker/console php -i
- docker-compose up -d
- curl -f localhost:8080
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Ready to run docker containers for php development.

1. Copy `.env.dist` to `.env`.
1. Configure `.env` if you need.
1. Copy `.env`, `docker` and `docker-compose.yml` to your app's root folder.
1. Copy `.env`, `docker`, `docker-compose.dev.yml` and `docker-compose.yml` to your app's root folder.
1. Enable dev mode `ln -sr docker-compose.dev.yml docker-compose.override.yml`.
1. Run `docker-compose up -d`.
1. Open in your browser http://localhost:8080/ to access the app.

Expand Down
13 changes: 13 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '2'
services:
db:
ports:
- 127.0.0.1:13306:3306

app:
volumes:
- ./docker/app/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro

web:
ports:
- $LISTEN_WEB:80
5 changes: 0 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ services:
environment:
- "MYSQL_ROOT_PASSWORD"
- "MYSQL_DATABASE=app"
ports:
- 127.0.0.1:13306:3306
volumes:
- /etc/localtime:/etc/localtime:ro

Expand All @@ -28,13 +26,10 @@ services:
volumes:
- /etc/localtime:/etc/localtime:ro
- ./docker/app/app.ini:/usr/local/etc/php/conf.d/app.ini:ro
- ./docker/app/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
- ./:/var/www/app:rw

web:
image: nginx
ports:
- $LISTEN_WEB:80
links:
- app
volumes:
Expand Down