Skip to content

Commit 32e6b0d

Browse files
authored
Merge pull request #9 from code4hire/feature/prebuilt-images
Feature/prebuilt images
2 parents bf73502 + 638b06c commit 32e6b0d

File tree

78 files changed

+19
-1492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+19
-1492
lines changed

docker-compose.yml

Lines changed: 10 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ services:
5252
node:
5353
build:
5454
context: docker/node
55-
args:
56-
- DESTINATION_PATH
55+
working_dir: DESTINATION_PATH
5756
links:
5857
- redis
5958
- rabbitmq
@@ -62,20 +61,7 @@ services:
6261

6362
# php 7.1
6463
php-fpm-7.1:
65-
build: docker/php-fpm-7.1
66-
links:
67-
- mysql
68-
- mailhog
69-
- redis
70-
- rabbitmq
71-
volumes:
72-
- "${DATA_PATH}/logs/php-fpm/7.1/:/var/log/php-fpm"
73-
- "${DATA_PATH}/logs/xdebug/7.1/:/var/log/xdebug"
74-
volumes_from:
75-
- app:rw
76-
77-
php-fpm-debug-7.1:
78-
build: docker/php-fpm-debug-7.1
64+
image: code4hire/php:7.1-fpm
7965
links:
8066
- mysql
8167
- mailhog
@@ -91,10 +77,8 @@ services:
9177
XDEBUG_CONFIG: "remote_connect_back=0 remote_autostart=0 remote_host=${HOST_IP} idekey=${IDEKEY} remote_port=9000"
9278

9379
php-cli-7.1:
94-
build:
95-
context: docker/php-cli-7.1
96-
args:
97-
- DESTINATION_PATH
80+
image: code4hire/php:7.1-cli
81+
working_dir: DESTINATION_PATH
9882
links:
9983
- mysql
10084
- mailhog
@@ -110,20 +94,7 @@ services:
11094

11195
# php 7.0
11296
php-fpm-7.0:
113-
build: docker/php-fpm-7.0
114-
links:
115-
- mysql
116-
- mailhog
117-
- redis
118-
- rabbitmq
119-
volumes:
120-
- "${DATA_PATH}/logs/php-fpm/7.0/:/var/log/php-fpm"
121-
- "${DATA_PATH}/logs/xdebug/7.0/:/var/log/xdebug"
122-
volumes_from:
123-
- app:rw
124-
125-
php-fpm-debug-7.0:
126-
build: docker/php-fpm-debug-7.0
97+
image: code4hire/php:7.0-fpm
12798
links:
12899
- mysql
129100
- mailhog
@@ -139,10 +110,8 @@ services:
139110
XDEBUG_CONFIG: "remote_connect_back=0 remote_autostart=0 remote_host=${HOST_IP} idekey=docker-xdebug remote_port=9000"
140111

141112
php-cli-7.0:
142-
build:
143-
context: docker/php-cli-7.0
144-
args:
145-
- DESTINATION_PATH
113+
image: code4hire/php:7.0-cli
114+
working_dir: DESTINATION_PATH
146115
links:
147116
- mysql
148117
- mailhog
@@ -158,20 +127,7 @@ services:
158127

159128
# php 5.6
160129
php-fpm-5.6:
161-
build: docker/php-fpm-5.6
162-
links:
163-
- mysql
164-
- mailhog
165-
- redis
166-
- rabbitmq
167-
volumes:
168-
- "${DATA_PATH}/logs/php-fpm/5.6/:/var/log/php-fpm"
169-
- "${DATA_PATH}/logs/xdebug/5.6/:/var/log/xdebug"
170-
volumes_from:
171-
- app:rw
172-
173-
php-fpm-debug-5.6:
174-
build: docker/php-fpm-debug-5.6
130+
image: code4hire/php:5.6-fpm
175131
links:
176132
- mysql
177133
- mailhog
@@ -187,10 +143,8 @@ services:
187143
XDEBUG_CONFIG: "remote_connect_back=0 remote_autostart=0 remote_host=${HOST_IP} idekey=docker-xdebug remote_port=9000"
188144

189145
php-cli-5.6:
190-
build:
191-
context: docker/php-cli-5.6
192-
args:
193-
- DESTINATION_PATH
146+
image: code4hire/php:5.6-cli
147+
working_dir: DESTINATION_PATH
194148
links:
195149
- mysql
196150
- mailhog
@@ -211,24 +165,17 @@ services:
211165
- NGINX_PROJECT_ROOT
212166
- NGINX_ENTRY_POINT_FILE
213167
- NGINX_ALLOWED_FILES
214-
215168
ports:
216169
- 8071:8071
217-
- 9071:9071
218170
- 8070:8070
219-
- 9070:9070
220171
- 8056:8056
221-
- 9056:9056
222172
volumes:
223173
- "${DATA_PATH}/logs/nginx/:/var/log/nginx"
224174
volumes_from:
225175
- php-fpm-7.1
226176
links:
227177
- php-fpm-7.1
228-
- php-fpm-debug-7.1
229178
- php-fpm-7.0
230-
- php-fpm-debug-7.0
231179
- php-fpm-5.6
232-
- php-fpm-debug-5.6
233180
depends_on:
234181
- app

docker/nginx/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ RUN apk add --update nginx && rm -rf /var/cache/apk/*
1010

1111
ADD ./nginx.conf /etc/nginx/nginx.conf
1212

13-
ADD ./application-7.1.conf \
14-
./application-debug-7.1.conf \
15-
./application-7.0.conf \
16-
./application-debug-7.0.conf \
17-
./application-5.6.conf \
18-
./application-debug-5.6.conf \
13+
ADD ./application-dev-7.1.conf \
14+
./application-dev-7.0.conf \
15+
./application-dev-5.6.conf \
1916
/etc/nginx/conf.d/
2017

2118
RUN /bin/sed -i "s@\${PROJECT_ROOT}@$NGINX_PROJECT_ROOT@" /etc/nginx/conf.d/application*.conf \
@@ -24,6 +21,6 @@ RUN /bin/sed -i "s@\${PROJECT_ROOT}@$NGINX_PROJECT_ROOT@" /etc/nginx/conf.d/appl
2421

2522
RUN mkdir -p /var/log/nginx
2623

27-
EXPOSE 8071 9071 8070 9070 8056 9056
24+
EXPOSE 8071 8070 8056
2825

2926
CMD ["nginx"]

docker/nginx/application-7.0.conf

Lines changed: 0 additions & 40 deletions
This file was deleted.

docker/nginx/application-7.1.conf

Lines changed: 0 additions & 39 deletions
This file was deleted.

docker/nginx/application-debug-5.6.conf

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location ~ ^/(${ALLOWED_FILES})\.php(/|$) {
12-
fastcgi_pass php-fpm-5.6:9001;
12+
fastcgi_pass php-fpm-5.6:9000;
1313
fastcgi_split_path_info ^(.+\.php)(/.*)$;
1414
include fastcgi_params;
1515
# When you are using symlinks to link the document root to the
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 9070;
2+
listen 8070;
33
#server_name symfony.dev;
44
root ${PROJECT_ROOT};
55

@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location ~ ^/(${ALLOWED_FILES})\.php(/|$) {
12-
fastcgi_pass php-fpm-debug-7.0:9002;
12+
fastcgi_pass php-fpm-7.0:9000;
1313
fastcgi_split_path_info ^(.+\.php)(/.*)$;
1414
include fastcgi_params;
1515
# When you are using symlinks to link the document root to the
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 9071;
2+
listen 8071;
33
#server_name symfony.dev;
44
root ${PROJECT_ROOT};
55

@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location ~ ^/(${ALLOWED_FILES})\.php(/|$) {
12-
fastcgi_pass php-fpm-debug-7.1:9002;
12+
fastcgi_pass php-fpm-7.1:9000;
1313
fastcgi_split_path_info ^(.+\.php)(/.*)$;
1414
include fastcgi_params;
1515
# When you are using symlinks to link the document root to the

docker/node/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ FROM node:7.4
22

33
LABEL maintainer Srdjan Vranac <vranac@gmail.com>
44

5-
ARG DESTINATION_PATH
6-
75
RUN npm install -g bower grunt-cli gulp-cli
8-
9-
WORKDIR $DESTINATION_PATH

0 commit comments

Comments
 (0)