Skip to content

Commit ec39e05

Browse files
author
Jason Huebel
authored
Merge pull request #121 from slayerbleast/master
Fix docker configuration, issue #119
2 parents 4e08be7 + 2e2142c commit ec39e05

File tree

4 files changed

+12
-94
lines changed

4 files changed

+12
-94
lines changed

.docker/flarepoint-nginx/nginx-dev.conf

-37
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,3 @@ server {
2424
include fastcgi_params;
2525
}
2626
}
27-
28-
server {
29-
listen 443 ssl;
30-
#ssl_certificate /etc/letsencrypt/live/flarepoint-crm.io/fullchain.pem;
31-
#ssl_certificate_key /etc/letsencrypt/live/flarepoint-crm.io/privkey.pem;
32-
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
33-
#ssl_prefer_server_ciphers on;
34-
#ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
35-
36-
server_name localhost;
37-
root /var/www/html/public;
38-
index index.php;
39-
40-
# Gzip
41-
gzip on;
42-
gzip_types text/plain text/xml text/css application/javascript application/x-javascript image/svg+xml;
43-
gzip_vary on;
44-
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
45-
46-
location = /favicon.ico {
47-
root /img;
48-
}
49-
50-
location / {
51-
try_files $uri $uri/ /index.php$is_args$args;
52-
}
53-
54-
location ~ \.php$ {
55-
try_files $uri =404;
56-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
57-
fastcgi_pass fastcgi_backend;
58-
fastcgi_index index.php;
59-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
60-
fastcgi_param DOCUMENT_ROOT $realpath_root;
61-
include fastcgi_params;
62-
}
63-
}

.docker/flarepoint-php/Dockerfile

+4-36
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,9 @@
1-
FROM php:7.0-fpm
1+
FROM php:7.2-fpm
22

3-
MAINTAINER Saleh Saeed <saleh.saiid@gmail.com>
3+
MAINTAINER Marc Pont <slayerbleast@gmail.com>
44

5-
WORKDIR /tmp
5+
RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev
66

7-
RUN usermod -u 1000 www-data
8-
9-
RUN docker-php-source extract \
10-
&& apt-get -qq update && apt-get install -y \
11-
git zlib1g-dev \
12-
libfreetype6-dev \
13-
libjpeg62-turbo-dev \
14-
libmcrypt-dev \
15-
libpng-dev \
16-
&& docker-php-ext-install pdo pdo_mysql zip \
17-
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
18-
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
19-
&& docker-php-ext-install -j$(nproc) gd \
20-
&& apt-get autoclean && apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
21-
&& docker-php-source delete
22-
23-
# Composer
247
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
258

26-
# Xdebug
27-
RUN pecl install -o -f xdebug-2.4.0
28-
29-
ADD .docker/flarepoint-php/php-xdebug.ini /usr/local/etc/php/conf.d/php-xdebug.ini
30-
RUN docker-php-ext-enable xdebug
31-
32-
COPY . /var/www/html
33-
WORKDIR /var/www/html
34-
35-
# Set permissions
36-
RUN chmod 0777 ./bootstrap/cache -R
37-
RUN chmod 0777 ./storage/* -R
38-
39-
# RUN cd /var/www/html && composer install -q --no-dev -o
40-
41-
CMD ["php-fpm"]
9+
RUN docker-php-ext-install pdo pdo_mysql zip gd

.docker/flarepoint-php/php-xdebug.ini

-6
This file was deleted.

docker-compose.yml

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
version: "2"
1+
version: "3"
22

33
services:
44
php:
55
container_name: flarepoint-php
66
build:
7-
context: .
8-
dockerfile: .docker/flarepoint-php/Dockerfile
7+
context: .docker
8+
dockerfile: flarepoint-php/Dockerfile
99
volumes:
1010
- .:/var/www/html
1111
environment:
@@ -23,10 +23,9 @@ services:
2323

2424
db:
2525
container_name: flarepoint-db
26-
image: mysql:latest
26+
image: mysql:5.7
2727
volumes:
28-
- .docker/flarepoint-db/mysql:/var/lib/mysql
29-
- .docker/flarepoint-db/db/:/docker-entrypoint-initdb.d/
28+
- mysql:/var/lib/mysql
3029
ports:
3130
- 3307:3306
3231
restart: always
@@ -38,7 +37,7 @@ services:
3837

3938
nginx:
4039
container_name: flarepoint-nginx
41-
image: nginx:latest
40+
image: nginx:1.17
4241
links:
4342
- php
4443
ports:
@@ -47,11 +46,5 @@ services:
4746
- .docker/flarepoint-nginx/nginx-dev.conf:/etc/nginx/conf.d/default.conf
4847
- .:/var/www/html
4948

50-
networks:
51-
default:
52-
driver: bridge
53-
ipam:
54-
driver: default
55-
config:
56-
- subnet: 172.16.0.0/16
57-
gateway: 172.16.0.1
49+
volumes:
50+
mysql:

0 commit comments

Comments
 (0)