create-directus-docker 1.6.8 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -25,6 +25,14 @@ npm start
|
|
|
25
25
|
|
|
26
26
|
The wizard will walk you through configuring your environment variables, and will launch all services for you.
|
|
27
27
|
|
|
28
|
+
### Permissions
|
|
29
|
+
|
|
30
|
+
You may need to grant additional access to the 'directus' directory, so that Directus can create files there. Just run:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
sudo chmod -R 777 directus
|
|
34
|
+
```
|
|
35
|
+
|
|
28
36
|
### Seeding MySQL data
|
|
29
37
|
|
|
30
38
|
If you want to seed your database with data on first launch, place your .sql file(s) in the "init" directory at the root of this package. MySQL will run any files in this directory the first time it launches.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-directus-docker",
|
|
3
3
|
"description": "An installer for Dockerized Directus + MySQL + Adminer + GraphQL Sandbox with a helper Node app",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Dave Kobrenski",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"copy:compose": "copy-file ../directus-mysql-template/docker-compose.yml ./templates/default/docker-compose.yml",
|
|
30
30
|
"copy:compose-nginx": "copy-file ../directus-mysql-template/docker-compose-nginx.yml ./templates/default/docker-compose-nginx.yml",
|
|
31
31
|
"copy:readme": "copy-file ../directus-mysql-template/README.md ./templates/default/README.md",
|
|
32
|
-
"copy:lib": "copyfiles --flat ../directus-mysql-template/lib/*.js ./templates/default/lib"
|
|
32
|
+
"copy:lib": "copyfiles --flat ../directus-mysql-template/lib/*.js ./templates/default/lib",
|
|
33
|
+
"copy:conf": "copy-file ../directus-mysql-template/custom_proxy_settings.conf ./templates/default/custom_proxy_settings.conf"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"src",
|
|
@@ -37,6 +37,14 @@ As an alternative, you can install this package by following these steps. Once y
|
|
|
37
37
|
|
|
38
38
|
*Note that you'll only have to do these two steps the first time you run this.*
|
|
39
39
|
|
|
40
|
+
### Permissions
|
|
41
|
+
|
|
42
|
+
You may need to grant additional access to the 'directus' directory, so that Directus can create files there. Just run:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
sudo chmod -R 777 directus
|
|
46
|
+
```
|
|
47
|
+
|
|
40
48
|
### Seeding MySQL data
|
|
41
49
|
|
|
42
50
|
If you want to seed your database with data on first launch, place your .sql file(s) in the "init" directory at the root of this package. MySQL will run any files in this directory the first time it launches.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
client_max_body_size 10m;
|
|
@@ -41,6 +41,7 @@ try {
|
|
|
41
41
|
console.log("Follow the prompts to configure Directus and MySQL.\n");
|
|
42
42
|
|
|
43
43
|
let git = await gitData();
|
|
44
|
+
let mode = 0o777;
|
|
44
45
|
|
|
45
46
|
if (fs.existsSync(path.join(rootPath, 'mysql')) === false) {
|
|
46
47
|
fs.mkdir(path.join(rootPath, 'mysql'), () => {
|
|
@@ -49,8 +50,8 @@ try {
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
if (fs.existsSync(path.join(rootPath, 'directus')) === false) {
|
|
52
|
-
fs.mkdir(path.join(rootPath, 'directus'), () => {
|
|
53
|
-
fs.mkdir(path.join(rootPath, 'directus/uploads'), () => {
|
|
53
|
+
fs.mkdir(path.join(rootPath, 'directus'), { mode }, () => {
|
|
54
|
+
fs.mkdir(path.join(rootPath, 'directus/uploads'), { mode }, () => {
|
|
54
55
|
//console.log(`'directus' directory created.`);
|
|
55
56
|
});
|
|
56
57
|
});
|
|
@@ -185,8 +186,13 @@ try {
|
|
|
185
186
|
|
|
186
187
|
writeStream.end();
|
|
187
188
|
|
|
189
|
+
// sudo chmod -R 777 directus
|
|
190
|
+
|
|
188
191
|
console.log("\nYou can always edit the variables that we've just set in the .env file manually.\n\n");
|
|
189
192
|
console.log(chalk.redBright("If you want to seed your database on first launch, place your .sql file(s) in the \"init\" directory BEFORE running services."));
|
|
193
|
+
|
|
194
|
+
console.log(chalk.redBright("\n\nNOTE: You may want to check the permissions of your 'directus' directory, which needs be read/write/execute for all users. Run this command to do so:\n"));
|
|
195
|
+
console.log("sudo chmod -R 777 directus");
|
|
190
196
|
console.log("");
|
|
191
197
|
|
|
192
198
|
inquirer.prompt([
|