Skip to content

Commit 271d33d

Browse files
committed
Fix db provision
1 parent 3a88b19 commit 271d33d

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

docs/recipe/provision.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ As only Ubuntu 20.04 LTS is supported for provision should be the `focal`.
2222

2323

2424
### sudo_password
25-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L157)
25+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L158)
2626

2727

2828

2929

3030

3131
### ssh_copy_id
32-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L163)
32+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L164)
3333

3434
Specify which key to copy to server.
3535
Set to `false` to disable copy of key.
@@ -84,63 +84,63 @@ Collect required params.
8484

8585

8686
### provision:update
87-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L80)
87+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L81)
8888

8989
Add repositories and update.
9090

9191

9292

9393

9494
### provision:upgrade
95-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L102)
95+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L103)
9696

9797
Upgrade all packages.
9898

9999

100100

101101

102102
### provision:install
103-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L109)
103+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L110)
104104

105105
Install packages.
106106

107107

108108

109109

110110
### provision:server
111-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L142)
111+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L143)
112112

113113
Configure server.
114114

115115

116116

117117

118118
### provision:ssh
119-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L147)
119+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L148)
120120

121121
Configure SSH.
122122

123123

124124

125125

126126
### provision:deployer
127-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L166)
127+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L167)
128128

129129
Setup deployer user.
130130

131131

132132

133133

134134
### provision:firewall
135-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L213)
135+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L214)
136136

137137
Setup firewall.
138138

139139

140140

141141

142142
### provision:banner
143-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L221)
143+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L222)
144144

145145
Show banner.
146146

docs/recipe/provision/databases.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ Provision databases.
4848

4949

5050
### provision:mysql
51-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L38)
51+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L37)
5252

5353
Provision MySQL.
5454

5555

5656

5757

5858
### provision:mariadb
59-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L52)
59+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L48)
6060

6161
Provision MariaDB.
6262

6363

6464

6565

6666
### provision:postgresql
67-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L57)
67+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L53)
6868

6969
Provision PostgreSQL.
7070

recipe/provision.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
'domain',
6262
'public_path',
6363
'php_version',
64+
'db_type',
6465
'db_user',
6566
'db_name',
6667
'db_password',

recipe/provision/databases.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,9 @@
3333
})
3434
->limit(1);
3535

36-
3736
desc('Provision MySQL');
3837
task('provision:mysql', function () {
39-
//run('apt-get install -y mysql-server', ['env' => ['DEBIAN_FRONTEND' => 'noninteractive']]);
40-
get('db_user');
41-
get('db_name');
42-
get('db_password');
38+
run('apt-get install -y mysql-server', ['env' => ['DEBIAN_FRONTEND' => 'noninteractive']]);
4339
run("mysql --user=\"root\" -e \"CREATE USER IF NOT EXISTS '{{db_user}}'@'0.0.0.0' IDENTIFIED BY '%secret%';\"", ['secret' => get('db_password')]);
4440
run("mysql --user=\"root\" -e \"CREATE USER IF NOT EXISTS '{{db_user}}'@'%' IDENTIFIED BY '%secret%';\"", ['secret' => get('db_password')]);
4541
run("mysql --user=\"root\" -e \"GRANT ALL PRIVILEGES ON *.* TO '{{db_user}}'@'0.0.0.0' WITH GRANT OPTION;\"");

0 commit comments

Comments
 (0)