8000 refactor: atualiza sistema docker para php 7.3 · zino-coder/docker-php8@db8268e · GitHub
[go: up one dir, main page]

Skip to content

Commit db8268e

Browse files
refactor: atualiza sistema docker para php 7.3
1 parent bbfe1a9 commit db8268e

File tree

7 files changed

+67
-70
lines changed

7 files changed

+67
-70
lines changed

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/**/.idea/
2-
/**/docker/apache/**/*.log
3-
/**/docker/mysql/
4-
/**/docker/pgsql/
2+
/**/docker/apache/logs/*
3+
!/**/docker/apache/logs/.gitkeep
4+
!/**/docker/apache/logs/apache2/.gitkeep
5+
/**/docker/mysql/*
6+
!/**/docker/mysql/config
7+
!/**/docker/mysql/database/.gitkeep
8+
/**/docker/postgres/*
9+
!/**/docker/postgres/.gitkeep

docker-compose.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3.1'
1+
version: '3'
22

33
services:
44
web:
@@ -12,60 +12,60 @@ services:
1212
- mysql
1313
# - pgsql
1414
ports:
15-
- "80:80"
16-
- "443:443"
15+
- '80:80'
16+
- '443:443'
1717
volumes:
18-
- ".:/var/www"
19-
- "./docker/apache/000-default.conf:/etc/apache2/sites-available/000-default.conf"
20-
- "./docker/apache/default-ssl.conf:/etc/apache2/sites-available/default-ssl.conf"
18+
- '.:/var/www'
19+
- './docker/apache/000-default.conf:/etc/apache2/sites-available/000-default.conf'
20+
- './docker/apache/default-ssl.conf:/etc/apache2/sites-available/default-ssl.conf'
2121
environment:
2222
- COMPOSER_ALLOW_SUPERUSER=1
2323
- DOCUMENT_ROOT=/var/www/public_html
2424
- APACHE_LOG_DIR=/var/www/docker/apache/logs
2525

2626
mysql:
2727
image: mysql:5.7
28-
command: --sql-mode=""
2928
restart: always
3029
networks:
3130
- mysql-network
3231
ports:
33-
- "3306:3306"
32+
- '3306:3306'
3433
volumes:
35-
- "./docker/mysql:/var/lib/mysql"
34+
- './docker/mysql/config:/etc/mysql/conf.d'
35+
- './docker/mysql/database:/var/lib/mysql'
3636
environment:
3737
- MYSQL_PASSWORD=root
3838
- MYSQL_ROOT_PASSWORD=root
3939
- MYSQL_DATABASE=development
4040

41-
phpmyadmin:
42-
image: phpmyadmin/phpmyadmin
43-
networks:
44-
- mysql-network
45-
depends_on:
46-
- mysql
47-
environment:
48-
PMA_HOST: mysql
49-
PMA_PORT: 3306
50-
ports:
51-
- '8080:80'
41+
# phpmyadmin:
42+
# image: phpmyadmin/phpmyadmin
43+
# networks:
44+
# - mysql-network
45+
# depends_on:
46+
# - mysql
47+
# environment:
48+
# PMA_HOST: mysql
49+
# PMA_PORT: 3306
50+
# ports:
51+
# - '8080:80'
5252

53-
# pgsql:
54-
# image: postgres
55-
# restart: always
56-
# networks:
57-
# - pgsql-network
58-
# ports:
59-
# - "5432:5432"
60-
# volumes:
61-
# - "./docker/postgres:/var/lib/postgresql"
62-
# environment:
63-
# - POSTGRES_USER=root
64-
# - POSTGRES_PASSWORD=root
65-
# - POSTGRES_DB=development
53+
# pgsql:
54+
# image: postgres
55+
# restart: always
56+
# networks:
57+
# - pgsql-network
58+
# ports:
59+
# - '5432:5432'
60+
# volumes:
61+
# - './docker/postgres:/var/lib/postgresql/data'
62+
# environment:
63+
# - POSTGRES_USER=root
64+
# - POSTGRES_PASSWORD=root
65+
# - POSTGRES_DB=development
6666

6767
networks:
6868
mysql-network:
6969
driver: bridge
70-
# pgsql-network:
71-
# driver: bridge
70+
# pgsql-network:
71+
# driver: bridge

docker/Dockerfile

Lines changed: 19 additions & 9 deletions
< 10000 tr class="diff-line-row">
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.2-apache
1+
FROM php:7.3-apache
22

33
# Atualiza e instala dependências
44
RUN apt-get update \
@@ -16,6 +16,8 @@ RUN apt-get update \
1616
libxml2-dev \
1717
libxslt-dev \
1818
libnotify-bin \
19+
libwebp-dev \
20+
libxpm-dev \
1921
unixodbc \
2022
unixodbc-dev \
2123
freetds-dev \
@@ -26,14 +28,18 @@ RUN apt-get update \
2628
vim \
2729
sudo \
2830
gnupg \
31+
unzip \
2932
&& rm -rf /var/lib/apt/lists/*
3033

3134
# Instala dependencia do php
32-
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
35+
RUN docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir
3336
RUN docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu
37+
RUN docker-php-ext-configure soap --enable-soap
3438
RUN docker-php-ext-install \
3539
gd \
3640
json \
41+
iconv \
42+
bcmath \
3743
xml \
3844
soap \
3945
mbstring \
@@ -46,7 +52,8 @@ RUN docker-php-ext-install \
4652
opcache \
4753
intl \
4854
xsl \
49-
exif
55+
exif \
56+
soap
5057

5158
# Instala composer
5259
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
@@ -55,20 +62,23 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
5562
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
5663
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');"
5764

58-
# Configura rar e xdebug
59-
RUN pecl -v install rar xdebug
60-
RUN docker-php-ext-enable rar
65+
# Instala xdebug
66+
RUN pecl -v install xdebug-beta
6167
RUN docker-php-ext-enable xdebug
6268

69+
# Instala rar
70+
# RUN pecl -v install rar
71+
# RUN docker-php-ext-enable rar
72+
6373
# Habilita modulos do apache
6474
RUN a2enmod rewrite
6575
RUN a2enmod ssl
6676

6777
# Cria certificado SSL
6878
RUN openssl req -new -x509 -days 365 -nodes \
69-
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \
70-
-keyout /etc/ssl/private/ssl-cert-snakeoil.key \
71-
-subj "/C=BR/ST=Paraná/L=Umuarama/O=VCWeb Networks/CN=*.localhost"
79+
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \
80+
-keyout /etc/ssl/private/ssl-cert-snakeoil.key \
81+
-subj "/C=BR/ST=Paraná/L=Umuarama/O=VCWeb Networks/CN=*.localhost"
7282

7383
# Habilita o certificado SSL
7484
RUN a2ensite default-ssl

docker/mysql/config/my.cnf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mysqld]
2+
max_allowed_packet=50M

docker/postgres/.gitkeep

Whitespace-only changes.

public_html/index.html

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

public_html/index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
phpinfo();

0 commit comments

Comments
 (0)
0