Skip to content

Commit 6742d00

Browse files
committed
updated scripts & fixed minor bugs
1 parent 76c0f19 commit 6742d00

File tree

10 files changed

+17
-8
lines changed

10 files changed

+17
-8
lines changed

Dockerfile

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

3636
## SET WORKDIR PATH
3737
WORKDIR /var/www
38+
39+
VOLUME ['/var/lib/mysql', '/var/log', '/var/www', '/root']

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ services:
77
- "${MYSQL_PORT}:3306"
88
- "${SUPERVISOR_PORT}:9001"
99
volumes:
10-
- ../:/var/www
10+
- ../:/var/www

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: 2 additions & 1 deletion
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,6 @@ 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 "CREATE USER 'root'@'%' IDENTIFIED BY '';"
2122
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '';"
2223
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

0 commit comments

Comments
 (0)