Skip to content

Commit ad49981

Browse files
committed
Merge pull request laradock#2 from LaraDock/master
Just update fork
2 parents e135fbb + 86c6389 commit ad49981

13 files changed

Lines changed: 625 additions & 182 deletions

File tree

README.md

Lines changed: 414 additions & 144 deletions
Large diffs are not rendered by default.

application/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM debian:jessie
2+
3+
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4+
5+
WORKDIR /var/www/laravel
6+
7+
CMD ["true"]

docker-compose.yml

Lines changed: 59 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,27 @@ version: '2'
22

33
services:
44

5-
### Nginx Server Container ##################################
5+
### PHP-FPM Container #######################################
66

7-
nginx:
8-
build: ./nginx
7+
php-fpm:
8+
build:
9+
context: ./php-fpm
10+
dockerfile: Dockerfile-70
911
volumes_from:
10-
- php
11-
volumes:
12-
- ./logs/nginx/:/var/log/nginx
13-
ports:
14-
- "80:80"
12+
- application
13+
expose:
14+
- "9000"
1515
links:
16-
- php
16+
- workspace
1717

18-
### PHP Container ###########################################
18+
### Laravel Application Code Container ######################
1919

20-
php:
21-
build: ./php
20+
application:
21+
build: ./application
2222
volumes:
2323
- ../:/var/www/laravel
24-
- ./logs/php/:/usr/local/var/log
25-
expose:
26-
- "9000"
2724

28-
### DATA Container ##########################################
25+
### Databases Data Container ################################
2926

3027
data:
3128
build: ./data
@@ -35,6 +32,21 @@ services:
3532
- /var/lib/mariadb
3633
- /var/lib/redis
3734
- /var/lib/memcached
35+
- /var/lib/neo4j/data
36+
37+
### Nginx Server Container ##################################
38+
39+
nginx:
40+
build: ./nginx
41+
volumes_from:
42+
- application
43+
volumes:
44+
- ./logs/nginx/:/var/log/nginx
45+
ports:
46+
- "80:80"
47+
- "443:443"
48+
links:
49+
- php-fpm
3850

3951
### MySQL Container #########################################
4052

@@ -49,8 +61,6 @@ services:
4961
MYSQL_USER: homestead
5062
MYSQL_PASSWORD: secret
5163
MYSQL_ROOT_PASSWORD: root
52-
links:
53-
- php
5464

5565
### PostgreSQL Container ####################################
5666

@@ -64,8 +74,6 @@ services:
6474
POSTGRES_DB: homestead
6575
POSTGRES_USER: homestead
6676
POSTGRES_PASSWORD: secret
67-
links:
68-
- php
6977

7078
### MariaDB Container #######################################
7179

@@ -80,8 +88,18 @@ services:
8088
MYSQL_USER: homestead
8189
MYSQL_PASSWORD: secret
8290
MYSQL_ROOT_PASSWORD: root
83-
links:
84-
- php
91+
92+
### Neo4j Container #########################################
93+
94+
neo4j:
95+
build: ./neo4j
96+
ports:
97+
- "7474:7474"
98+
- "1337:1337"
99+
environment:
100+
- NEO4J_AUTH=homestead:secret
101+
volumes_from:
102+
- data
85103

86104
### Redis Container #########################################
87105

@@ -92,15 +110,28 @@ services:
92110
ports:
93111
- "6379:6379"
94112

113+
### Memcached Container #####################################
114+
115+
memcached:
116+
build: ./memcached
117+
volumes_from:
118+
- data
119+
ports:
120+
- "11211:11211"
121+
links:
122+
- php-fpm
123+
95124
### Beanstalkd Container ####################################
96125

97126
beanstalkd:
98127
build: ./beanstalkd
99128
ports:
100129
- "11300:11300"
101130
privileged: true
131+
links:
132+
- php-fpm
102133

103-
### Beanstalkd-Console Container ############################
134+
### Beanstalkd Console Container ############################
104135

105136
beanstalkd-console:
106137
build: ./beanstalkd-console
@@ -109,13 +140,12 @@ services:
109140
links:
110141
- beanstalkd
111142

112-
### Memcached Container #########################################
143+
### Workspace Utilities Container ###########################
113144

114-
memcached:
115-
build: ./memcached
145+
workspace:
146+
build: ./workspace
116147
volumes_from:
117-
- data
118-
ports:
119-
- "11211:11211"
148+
- application
149+
tty: true
120150

121151
### Add more Containers below ###############################

neo4j/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM tpires/neo4j
2+
3+
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4+
5+
VOLUME /var/lib/neo4j/data
6+
7+
EXPOSE 7474 1337

nginx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
55
ADD nginx.conf /etc/nginx/
66
ADD laravel.conf /etc/nginx/sites-available/
77

8-
RUN echo "upstream php-upstream { server php:9000; }" > /etc/nginx/conf.d/upstream.conf
8+
RUN echo "upstream php-upstream { server php-fpm:9000; }" > /etc/nginx/conf.d/upstream.conf
99

1010
RUN usermod -u 1000 www-data
1111

nginx/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ http {
1717
types_hash_max_size 2048;
1818
include /etc/nginx/mime.types;
1919
default_type application/octet-stream;
20-
access_log off;
21-
error_log off;
20+
access_log on;
21+
error_log on;
2222
gzip on;
2323
gzip_disable "msie6";
2424
include /etc/nginx/conf.d/*.conf;

php-fpm/Dockerfile-55

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM php:5.5-fpm
2+
3+
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4+
5+
ADD ./laravel.ini /usr/local/etc/php/conf.d
6+
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
7+
8+
RUN apt-get update && apt-get install -y \
9+
libpq-dev \
10+
libmemcached-dev \
11+
curl
12+
13+
# Install extensions using the helper script provided by the base image
14+
RUN docker-php-ext-install \
15+
pdo_mysql \
16+
pdo_pgsql
17+
18+
#Install memcached
19+
RUN pecl install memcached \
20+
&& docker-php-ext-enable memcached
21+
22+
RUN usermod -u 1000 www-data
23+
24+
WORKDIR /var/www/laravel
25+
26+
CMD ["php-fpm"]
27+
28+
EXPOSE 9000

php-fpm/Dockerfile-56

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM php:5.6-fpm
2+
3+
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4+
5+
ADD ./laravel.ini /usr/local/etc/php/conf.d
6+
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
7+
8+
RUN apt-get update && apt-get install -y \
9+
libpq-dev \
10+
libmemcached-dev \
11+
curl
12+
13+
# Install extensions using the helper script provided by the base image
14+
RUN docker-php-ext-install \
15+
pdo_mysql \
16+
pdo_pgsql
17+
18+
#Install memcached
19+
RUN pecl install memcached \
20+
&& docker-php-ext-enable memcached
21+
22+
RUN usermod -u 1000 www-data
23+
24+
WORKDIR /var/www/laravel
25+
26+
CMD ["php-fpm"]
27+
28+
EXPOSE 9000

php/Dockerfile renamed to php-fpm/Dockerfile-70

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# You can change the PHP version from here. After changing the PHP version, check the Memcached section below because it replies on PHP 7.
2-
FROM php:7.0-fpm
1+
FROM php:7.0-fpm
32

43
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
54

65
ADD ./laravel.ini /usr/local/etc/php/conf.d
76
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
87

9-
RUN apt-get update && apt-get install \
10-
libpq-dev -y \
11-
curl \
12-
libmemcached-dev
8+
RUN apt-get update && apt-get install -y \
9+
libpq-dev \
10+
libmemcached-dev \
11+
curl
1312

1413
# Install extensions using the helper script provided by the base image
1514
RUN docker-php-ext-install \
File renamed without changes.

0 commit comments

Comments
 (0)