Skip to content

Commit 3bec4ba

Browse files
authored
Merge pull request #19 from rm-yakovenko/15-docker
15 docker-compose.dev.yml
2 parents 2139969 + a85916a commit 3bec4ba

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/.env
1+
/.env
2+
/docker-compose.override.yml

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ script:
77
- export MYSQL_ROOT_PASSWORD=root
88
- cp .env.dist .env
99
- XDEBUG=1 docker-compose build
10+
- ln -sr docker-compose.dev.yml docker-compose.override.yml
1011
- docker/console php -i
1112
- docker-compose up -d
1213
- curl -f localhost:8080

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Ready to run docker containers for php development.
66

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

docker-compose.dev.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '2'
2+
services:
3+
db:
4+
ports:
5+
- 127.0.0.1:13306:3306
6+
7+
app:
8+
volumes:
9+
- ./docker/app/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
10+
11+
web:
12+
ports:
13+
- $LISTEN_WEB:80

docker-compose.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ services:
99
environment:
1010
- "MYSQL_ROOT_PASSWORD"
1111
- "MYSQL_DATABASE=app"
12-
ports:
13-
- 127.0.0.1:13306:3306
1412
volumes:
1513
- /etc/localtime:/etc/localtime:ro
1614

@@ -28,13 +26,10 @@ services:
2826
volumes:
2927
- /etc/localtime:/etc/localtime:ro
3028
- ./docker/app/app.ini:/usr/local/etc/php/conf.d/app.ini:ro
31-
- ./docker/app/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
3229
- ./:/var/www/app:rw
3330

3431
web:
3532
image: nginx
36-
ports:
37-
- $LISTEN_WEB:80
3833
links:
3934
- app
4035
volumes:

0 commit comments

Comments
 (0)