Skip to content

Commit e1112bb

Browse files
committed
WIP updated errors
1 parent 777e0b5 commit e1112bb

File tree

8 files changed

+64
-31
lines changed

8 files changed

+64
-31
lines changed

.env.example

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
##### NGINX ############
2-
NGINX_PORT=9900
1+
## PROJECT ##
2+
COMPOSE_PROJECT_NAME=kodhub
3+
PHP_IDE_CONFIG=phpstorm
34

4-
##### SUPERVISOR ############
5-
SUPERVISOR_PORT=9901
5+
## PORTS ##
6+
NGINX_PORT=1100
7+
SUPERVISOR_PORT=1101
8+
MYSQL_PORT=1102
9+
RABBITMQ_PORT=1103
10+
REDIS_PORT=1104
11+
PHPFPM_PORT=1105
612

7-
###### MYSQL #########
8-
MYSQL_PORT=9902
13+
## IPS ##
14+
IP_ADDRESS=
915

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.con
3535

3636
## SET WORKDIR PATH
3737
WORKDIR /var/www
38+
39+
EXPOSE 3306 9000 80 6379
40+

conf/nginx/sites-enabled/default.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ server {
1919
location ~ \.php$ {
2020
try_files $uri =404;
2121
fastcgi_split_path_info ^(.+\.php)(/.+)$;
22-
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
22+
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
2323
fastcgi_index index.php;
2424
include fastcgi_params;
2525
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@@ -29,4 +29,4 @@ server {
2929

3030
error_log /var/log/nginx/localhost.log;
3131
access_log /var/log/nginx/localhost.log;
32-
}
32+
}

conf/supervisor/conf.d/phpfpm.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[supervisord]
22
nodaemon=true
33

4-
[program:system-php7.2-fpm]
5-
command=/usr/sbin/php-fpm7.2 -F
4+
[program:system-php7.4-fpm]
5+
command=/usr/sbin/php-fpm7.4 -F
66
autostart=true
77
autorestart=true
8-
stdout_logfile=/var/log/php-fpm7.2.log
8+
stdout_logfile=/var/log/php-fpm7.4.log

docker-compose.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
version: "3"
1+
version: '3'
22
services:
33
laravel:
44
build: .
55
ports:
6-
- "${NGINX_PORT}:80"
7-
- "${MYSQL_PORT}:3306"
8-
- "${SUPERVISOR_PORT}:9001"
6+
- '${NGINX_PORT}:80'
7+
- '${MYSQL_PORT}:3306'
8+
- '${SUPERVISOR_PORT}:9001'
9+
- '${REDIS_PORT}:6379'
10+
- '${PHPFPM_PORT}:9000'
911
volumes:
10-
- ../:/var/www
11-
- /root
12-
- /var/lib/mysql
13-
- /var/log
12+
- '../:/var/www'
13+
- 'laravel_root_volume:/root'
14+
- 'laravel_mysql_volume:/var/lib/mysql'
15+
- 'laravel_varlog_volume:/var/log'
16+
environment:
17+
- 'PHP_IDE_CONFIG=${PHP_IDE_CONFIG}'
18+
volumes:
19+
laravel_mysql_volume: null
20+
laravel_varlog_volume: null
21+
laravel_root_volume: null

opt/installer/mysql-installer.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ echo "Mysql installer starting..."
1515
} | debconf-set-selections &&
1616
apt-get install -y mysql-server mysql-client && rm -rf /var/lib/apt/lists/*
1717

18+
usermod -d /var/lib/mysql/ mysql
19+
20+
sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
21+
1822
service mysql start
1923

2024
mysql -e "CREATE DATABASE laravel /*\!40100 DEFAULT CHARACTER SET utf8 */;"

opt/installer/nginx-installer.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env bash
22
echo "Nginx installer starting.."
33

4+
apt clean
5+
6+
apt update
7+
48
apt install nginx -y

opt/installer/phpfpm-installer.sh

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,31 @@ echo "PHP-FPM installer starting..."
33

44
export DEBIAN_FRONTEND=noninteractive
55

6+
echo "deneme";
7+
8+
apt install software-properties-common -y
9+
add-apt-repository ppa:ondrej/php
10+
apt update
11+
612
apt install -y \
713
libcurl4 \
8-
php7.2-fpm \
9-
php7.2-curl \
10-
php7.2-cli \
11-
php7.2-mysql \
12-
php7.2-gd \
13-
php7.2-xsl \
14-
php7.2-json \
15-
php7.2-intl \
14+
php7.4-fpm \
15+
php7.4-curl \
16+
php7.4-cli \
17+
php7.4-mysql \
18+
php7.4-gd \
19+
php7.4-xsl \
20+
php7.4-json \
21+
php7.4-intl \
1622
php-pear \
17-
php7.2-dev \
18-
php7.2-common \
19-
php7.2-mbstring \
20-
php7.2-zip \
23+
php7.4-dev \
24+
php7.4-common \
25+
php7.4-mbstring \
26+
php7.4-zip \
2127
php-soap
2228

29+
php -v
30+
2331
echo "PHP-FPM installer completed..."
2432

2533
echo "Composer installer starting..."

0 commit comments

Comments
 (0)