File tree 12 files changed +55
-11
lines changed
12 files changed +55
-11
lines changed Original file line number Diff line number Diff line change 1
- # laravel-dockerized
2
- Laravel Dockerized
1
+ # Laravel Dockerized
2
+ ![ GitHub release (latest by date including pre-releases)] ( https://img.shields.io/github/v/release/kodhub/laravel-dockerized?include_prereleases )
3
+ ![ GitHub issues] ( https://img.shields.io/github/issues-raw/kodhub/laravel-dockerized )
4
+ ![ GitHub closed issues] ( https://img.shields.io/github/issues-closed-raw/kodhub/laravel-dockerized?color=009fe1 )
5
+ ![ GitHub All Releases] ( https://img.shields.io/github/downloads/kodhub/laravel-dockerized/total? )
6
+
7
+ Laravel easy docker environment.
8
+
9
+ ### Support
10
+ * nginx
11
+ * php-fpm ( v7.2 )
12
+ * mysql ( v5.7 )
13
+ * redis
14
+ * crontab
15
+ * supervisor
16
+
17
+ ### Install on Your Laravel Project
18
+
19
+ Write the following code to the directory where your project folder is located on the terminal.
20
+
21
+ 1- ` git clone git@github.com:kodhub/laravel-dockerized.git .docker `
22
+
23
+ 2- ` docker-compose up -d --build `
24
+
25
+ 3- ` docker exec -it <container-id> bash `
26
+
27
+ 4- Your project install steps
28
+
29
+
30
+ ### Documentation
31
+
32
+ coming soon..
Original file line number Diff line number Diff line change 1
1
## FIRST LINE NON DELETE!! ##
2
- * * * * * ls -lah >> /tmp/crontab.log
3
- * * * * * pwd >> /tmp/crontab-pwd.log
2
+ * * * * * php /var/www/artisan schedule:run >> /var/log/schedule-run.log
Original file line number Diff line number Diff line change 2
2
nodaemon=true
3
3
4
4
[program:system-mysql]
5
- command=mysqld_safe
5
+ command=/usr/bin/pidproxy /var/run/mysqld/mysqld.pid /opt/docker/system/program/start-mysql.sh
6
+ stop-command=
6
7
autostart=true
7
8
autorestart=true
8
9
stdout_logfile=/var/log/mysql.log
Original file line number Diff line number Diff line change @@ -7,4 +7,7 @@ services:
7
7
- " ${MYSQL_PORT}:3306"
8
8
- " ${SUPERVISOR_PORT}:9001"
9
9
volumes :
10
- - ../:/var/www
10
+ - ../:/var/www
11
+ - /root
12
+ - /var/lib/mysql
13
+ - /var/log
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
echo " 3RD installer starting..."
3
3
4
4
apt update && apt install -ym \
@@ -14,7 +14,7 @@ echo "3RD installer completed..."
14
14
15
15
cat /etc/crontab/crontab.conf > /etc/cron.d/crontab.tpl
16
16
17
- while IFS=" " read -r p || [ -n " $p " ]
17
+ while IFS=" " read -r p || [[ -n " $p " ] ]
18
18
do
19
19
printf ' %s\n' " $p "
20
20
(crontab -l && echo " $p " ) | crontab -
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
1
2
echo " Mysql installer starting..."
2
3
3
4
# Install mysql
@@ -17,6 +18,7 @@ echo "Mysql installer starting..."
17
18
service mysql start
18
19
19
20
mysql -e " CREATE DATABASE laravel /*\!40100 DEFAULT CHARACTER SET utf8 */;"
20
- mysql -e " CREATE USER root@% IDENTIFIED BY '';"
21
- mysql -e " GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '';"
21
+ mysql -e " CREATE USER 'root'@'localhost' IDENTIFIED BY '';"
22
+ mysql -e " GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '';"
23
+ mysql -e " UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User='root';"
22
24
mysql -e " FLUSH PRIVILEGES;"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
1
2
echo " Nginx installer starting.."
2
3
3
- apt install nginx -y
4
+ apt install nginx -y
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
1
2
echo " PHP-FPM installer starting..."
2
3
3
4
export DEBIAN_FRONTEND=noninteractive
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
1
2
echo " Mysql installer starting..."
2
3
3
4
apt install redis-server php-redis -y -o Dpkg::Options::=" --force-confold"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ exec mysqld_safe
Original file line number Diff line number Diff line change
1
+ data /*
2
+ log /*
3
+ root /*
You can’t perform that action at this time.
0 commit comments