Skip to content

Commit 514d11e

Browse files
authored
Merge pull request #4 from kodhub/develop
Develop
2 parents 5ae17c0 + e1743fe commit 514d11e

12 files changed

+55
-11
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
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..

Readme.md

Whitespace-only changes.

conf/crontab/crontab.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
## 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

conf/supervisor/conf.d/mysql.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
nodaemon=true
33

44
[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=
67
autostart=true
78
autorestart=true
89
stdout_logfile=/var/log/mysql.log

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ services:
77
- "${MYSQL_PORT}:3306"
88
- "${SUPERVISOR_PORT}:9001"
99
volumes:
10-
- ../:/var/www
10+
- ../:/var/www
11+
- /root
12+
- /var/lib/mysql
13+
- /var/log

opt/installer/3rd-installer.sh

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

44
apt update && apt install -ym \
@@ -14,7 +14,7 @@ echo "3RD installer completed..."
1414

1515
cat /etc/crontab/crontab.conf > /etc/cron.d/crontab.tpl
1616

17-
while IFS="" read -r p || [ -n "$p" ]
17+
while IFS="" read -r p || [[ -n "$p" ]]
1818
do
1919
printf '%s\n' "$p"
2020
(crontab -l && echo "$p") | crontab -

opt/installer/mysql-installer.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env bash
12
echo "Mysql installer starting..."
23

34
# Install mysql
@@ -17,6 +18,7 @@ echo "Mysql installer starting..."
1718
service mysql start
1819

1920
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';"
2224
mysql -e "FLUSH PRIVILEGES;"

opt/installer/nginx-installer.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env bash
12
echo "Nginx installer starting.."
23

3-
apt install nginx -y
4+
apt install nginx -y

opt/installer/phpfpm-installer.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env bash
12
echo "PHP-FPM installer starting..."
23

34
export DEBIAN_FRONTEND=noninteractive

opt/installer/redis-installer.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env bash
12
echo "Mysql installer starting..."
23

34
apt install redis-server php-redis -y -o Dpkg::Options::="--force-confold"

opt/program/start-mysql.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
exec mysqld_safe

storage/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data/*
2+
log/*
3+
root/*

0 commit comments

Comments
 (0)