Skip to content

Commit 02f2b43

Browse files
authored
Merge pull request #11 from GDRCD/dev
v2.0.0
2 parents 0795e09 + f3e8a41 commit 02f2b43

65 files changed

Lines changed: 4281 additions & 343 deletions

Some content is hidden

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

.docker/compose.yml

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,36 @@
11
services:
22

3-
php:
3+
webserver:
44
build:
5-
context: "services/php"
6-
dockerfile: "Dockerfile.${PHP_VERSION}"
5+
context: "${STACK_DIR}"
6+
dockerfile: "${STACK_DIR}/.docker/services/webserver/version/${PHP_VERSION}/Dockerfile"
77
args:
88
uid: "${PHP_UID}"
9-
image: "${PROJECT}_php"
10-
container_name: "${PROJECT}_php"
9+
image: "${PROJECT}_webserver"
10+
container_name: "${PROJECT}_webserver"
11+
ports:
12+
- "${SERVICE_PORT}:80"
1113
volumes:
12-
- ./services/php/config/conf.d:/usr/local/etc/php/conf.d:ro
13-
- ../service:/var/www/html
14+
# Log
15+
- "${STACK_DIR}/logs/nginx:/var/log/nginx"
16+
# PHP
17+
- "${STACK_DIR}/.docker/services/webserver/config/conf.d:/usr/local/etc/php/conf.d:ro"
18+
# Web
19+
- "${STACK_DIR}/www:/var/www/html"
1420
environment:
1521
MYSQL_USER: ${MYSQL_USER}
1622
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
1723

18-
nginx:
19-
build:
20-
context: "services/nginx"
21-
image: "${PROJECT}_nginx"
22-
container_name: "${PROJECT}_nginx"
23-
ports:
24-
- "${SERVICE_PORT}:80"
25-
- "${PMA_PORT}:8080"
26-
volumes:
27-
- ../service:/var/www/html
28-
- ./services/nginx/config/conf.d:/etc/nginx/conf.d
29-
- ../logs/nginx:/var/log/nginx
30-
- phpmyadmin-data:/var/www/phpmyadmin
31-
depends_on:
32-
- php
33-
3424
database:
3525
build:
3626
context: "services/database"
3727
image: "${PROJECT}_database"
3828
container_name: "${PROJECT}_database"
39-
#restart: // always;unless-stopped
4029
ports:
4130
- "${DB_PORT}:3306"
4231
volumes:
43-
- ./services/database/config/conf.d/my.cnf:/etc/mysql/conf.d/my.cnf
44-
- database-data:/var/lib/mysql
32+
- "${STACK_DIR}/.docker/services/database/config/conf.d/my.cnf:/etc/mysql/conf.d/my.cnf"
33+
- "database-data:/var/lib/mysql"
4534
environment:
4635
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
4736
MYSQL_DATABASE: ${MYSQL_DATABASE}
@@ -53,21 +42,23 @@ services:
5342
context: "services/phpmyadmin"
5443
image: "${PROJECT}_phpmyadmin"
5544
container_name: "${PROJECT}_phpmyadmin"
56-
volumes:
57-
- phpmyadmin-data:/var/www/html
45+
ports:
46+
- "${PMA_PORT}:80"
5847
environment:
59-
PMA_HOST: database
48+
- PMA_HOST=database
49+
depends_on:
50+
- database
51+
profiles: ["phpmyadmin"]
6052

6153
mailhog:
6254
build:
6355
context: "services/mailhog"
6456
image: "${PROJECT}_mailhog"
6557
container_name: "${PROJECT}_mailhog"
66-
#restart: always
6758
ports:
6859
- "${MAILHOG_PORT}:8025"
60+
profiles: ["mailhog"]
6961

7062
# Volumes
7163
volumes:
7264
database-data:
73-
phpmyadmin-data:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM mysql:5.7
1+
FROM mysql:8.0
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[mysqld]
22
collation-server = utf8mb4_unicode_ci
33
character-set-server = utf8mb4
4-
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
54
default_time_zone = Europe/Rome

.docker/services/nginx/Dockerfile

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

.docker/services/nginx/config/conf.d/phpmyadmin.conf

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

.docker/services/nginx/config/example.php.conf

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

.docker/services/php/config/conf.d/php.ini renamed to .docker/services/webserver/config/conf.d/php.ini

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ extension=zip.so
1313
; http://php.net/date.timezone
1414
date.timezone = "Europe/Rome"
1515

16-
; Xdebug
17-
; See https://xdebug.org/docs/all_settings
18-
19-
;PHPStorm
20-
[Xdebug]
21-
xdebug.remote_enable=1
22-
xdebug.idekey=PHPSTORM
23-
xdebug.profiler_enable=0
24-
xdebug.max_nesting_level=700
25-
xdebug.remote_host=192.168.0.1 # your ip
26-
xdebug.remote_port=9000
27-
2816
; INTL Extension
2917
[intl]
3018
intl.default_locale =

.docker/services/php/config/conf.d/www.conf renamed to .docker/services/webserver/config/conf.d/www.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ group = www-data
1717
; specific port;
1818
; '/path/to/unix/socket' - to listen on a unix socket.
1919
; Note: This value is mandatory.
20-
listen = nginx:9000
20+
listen = 127.0.0.0:9000
2121

2222

2323
; Choose how the process manager will control the number of child processes.
@@ -72,4 +72,4 @@ pm.min_spare_servers = 1
7272
; Note: Mandatory when pm is set to 'dynamic'
7373
pm.max_spare_servers = 3
7474

75-
;---------------------
75+
;---------------------

.docker/services/nginx/config/conf.d/php.conf renamed to .docker/services/webserver/config/sites-available/default.nginx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ server {
1818
location ~ \.php$ {
1919
try_files $uri =404;
2020
fastcgi_split_path_info ^(.+\.php)(/.+)$;
21-
fastcgi_pass php:9000;
21+
fastcgi_pass 127.0.0.0:9000;
2222
fastcgi_index index.php;
2323
include fastcgi_params;
2424
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2525
fastcgi_param PATH_INFO $fastcgi_path_info;
2626
}
27-
}
27+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# PHP > Start services
5+
service memcached start
6+
php-fpm -D
7+
nginx -g 'daemon off;'

0 commit comments

Comments
 (0)