ankpan18 commited on
Commit
04e1813
·
1 Parent(s): 09736a3

updated dockerfile

Browse files
Files changed (1) hide show
  1. setup.sh +21 -18
setup.sh CHANGED
@@ -1,22 +1,25 @@
1
  # !/bin/bash
2
- su
3
- #mysql has to be started this way as it doesn't work to call from /etc/init.d
4
- /usr/bin/mysqld_safe &
5
- sleep 10s
6
- # Here we generate random passwords (thank you pwgen!). The first two are for mysql users, the last batch for random keys in wp-config.php
7
- MYSQL_PASSWORD=`pwgen -c -n -1 12`
 
 
 
8
 
9
- #This is so the passwords show up in logs.
10
- echo mysql root password: $MYSQL_PASSWORD
11
- echo $MYSQL_PASSWORD > /mysql-root-pw.txt
12
- #there used to be a huge ugly line of sed and cat and pipe and stuff below,
13
- #but thanks to @djfiander's thing at https://gist.github.com/djfiander/6141138
14
- #there isn't now.
15
 
16
 
17
- mysqladmin -u root password $MYSQL_PASSWORD
18
- mysql -uroot -p$MYSQL_PASSWORD -e "CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY '$WORDPRESS_PASSWORD'; FLUSH PRIVILEGES;"
19
- killall mysqld
20
- sleep 10s
21
- fi
22
- supervisord -n
 
1
  # !/bin/bash
2
+ sudo whoami
3
+ sudo ls -l
4
+ sudo DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server python3 pip mysql-server vim mc wget curl
5
+ # # su
6
+ # #mysql has to be started this way as it doesn't work to call from /etc/init.d
7
+ # /usr/bin/mysqld_safe &
8
+ # sleep 10s
9
+ # # Here we generate random passwords (thank you pwgen!). The first two are for mysql users, the last batch for random keys in wp-config.php
10
+ # MYSQL_PASSWORD=`pwgen -c -n -1 12`
11
 
12
+ # #This is so the passwords show up in logs.
13
+ # echo mysql root password: $MYSQL_PASSWORD
14
+ # echo $MYSQL_PASSWORD > /mysql-root-pw.txt
15
+ # #there used to be a huge ugly line of sed and cat and pipe and stuff below,
16
+ # #but thanks to @djfiander's thing at https://gist.github.com/djfiander/6141138
17
+ # #there isn't now.
18
 
19
 
20
+ # mysqladmin -u root password $MYSQL_PASSWORD
21
+ # mysql -uroot -p$MYSQL_PASSWORD -e "CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY '$WORDPRESS_PASSWORD'; FLUSH PRIVILEGES;"
22
+ # killall mysqld
23
+ # sleep 10s
24
+ # fi
25
+ # supervisord -n