create-directus-docker 1.6.1 → 1.6.3
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 +1 -1
- package/package.json +1 -1
- package/templates/default/README.md +2 -2
- package/templates/default/docker-compose.yml +3 -3
- package/templates/default/lib/check-requirements.js +2 -2
- package/templates/default/lib/launch-services.js +4 -0
- package/templates/default/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ The wizard will walk you through configuring your environment variables, and wil
|
|
|
29
29
|
|
|
30
30
|
Directus CMS: http://localhost:8055
|
|
31
31
|
Adminer (for MySQL): http://localhost:8080
|
|
32
|
-
Apollo GraphQL Sandbox: https://studio.apollographql.com/sandbox/explorer?endpoint=http://localhost:8055
|
|
32
|
+
Apollo GraphQL Sandbox: https://studio.apollographql.com/sandbox/explorer?endpoint=http://localhost:8055/graphql
|
|
33
33
|
|
|
34
34
|
## Seeding MySQL data
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ Then wait 10-20 seconds (for MySQL to boot), then type:
|
|
|
82
82
|
**Boom!** You're done. Now you can access the URLS from here:
|
|
83
83
|
|
|
84
84
|
Directus CMS: http://localhost:8055
|
|
85
|
-
Apollo GraphQL Sandbox: https://studio.apollographql.com/sandbox/explorer?endpoint=http://localhost:8055
|
|
85
|
+
Apollo GraphQL Sandbox: https://studio.apollographql.com/sandbox/explorer?endpoint=http://localhost:8055/graphql
|
|
86
86
|
Adminer (for MySQL): http://localhost:8080
|
|
87
87
|
|
|
88
88
|
**Check on running containers:**
|
|
@@ -93,4 +93,4 @@ Simply run `docker compose ps` to see the status of running containers. Or, run
|
|
|
93
93
|
|
|
94
94
|
curl -X POST localhost:8055/auth/login -H 'Content-Type: application/json' -d '{"email":"you@email.com","password":"your-password"}'
|
|
95
95
|
|
|
96
|
-
curl -X POST localhost:8055/auth/refresh -H 'Content-Type: application/json' -d '{"refresh_token": "W5L70MBXKElx5ZVZwxmQVG8qdVjukiRVIwD5FYG7tCPyyuCM_I3IyCsYnFhMUrRi", "mode": "json"}'
|
|
96
|
+
curl -X POST localhost:8055/auth/refresh -H 'Content-Type: application/json' -d '{"refresh_token": "W5L70MBXKElx5ZVZwxmQVG8qdVjukiRVIwD5FYG7tCPyyuCM_I3IyCsYnFhMUrRi", "mode": "json"}'
|
|
@@ -2,7 +2,7 @@ services:
|
|
|
2
2
|
|
|
3
3
|
mysql:
|
|
4
4
|
container_name: mysql
|
|
5
|
-
image: mysql:
|
|
5
|
+
image: mysql:9.0.1
|
|
6
6
|
restart: always
|
|
7
7
|
healthcheck:
|
|
8
8
|
test: ['CMD', 'mysqladmin', 'ping', '--silent']
|
|
@@ -17,7 +17,7 @@ services:
|
|
|
17
17
|
volumes:
|
|
18
18
|
- ./mysql:/var/lib/mysql
|
|
19
19
|
- ./init:/docker-entrypoint-initdb.d
|
|
20
|
-
command: --mysql-native-password=ON
|
|
20
|
+
# command: --mysql-native-password=ON
|
|
21
21
|
environment:
|
|
22
22
|
MYSQL_USER: ${MYSQL_USER}
|
|
23
23
|
MYSQL_PASSWORD: ${MYSQL_PASS}
|
|
@@ -55,7 +55,7 @@ services:
|
|
|
55
55
|
|
|
56
56
|
directus:
|
|
57
57
|
container_name: directus
|
|
58
|
-
image: directus/directus:
|
|
58
|
+
image: directus/directus:11.1.1
|
|
59
59
|
restart: always
|
|
60
60
|
ports:
|
|
61
61
|
- ${DIRECTUS_PORT}:8055
|
|
@@ -14,9 +14,9 @@ export default async function checkRequirements() {
|
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
if (major <
|
|
17
|
+
if (major < 18) {
|
|
18
18
|
console.error(`You are running ${chalk.red(`Node ${nodeVersion}`)}.`);
|
|
19
|
-
console.error(`Directus requires ${chalk.green(`Node
|
|
19
|
+
console.error(`Directus requires ${chalk.green(`Node 18`)} and up.`);
|
|
20
20
|
console.error('Please update your Node version and try again.');
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
@@ -147,6 +147,10 @@ export default function launchServices() {
|
|
|
147
147
|
const check = spawn('docker', ['compose', 'ps', '-a', '--format', 'json']);
|
|
148
148
|
|
|
149
149
|
check.stdout.on('data', (data) => {
|
|
150
|
+
// var tmp = data.toString();
|
|
151
|
+
// var tmpJson = JSON.parse(tmp);
|
|
152
|
+
// console.log(tmpJson);
|
|
153
|
+
|
|
150
154
|
const q = 'map(select(.Name == "directus")) | .[0] | {Name: .Name, Service: .Service, State: .State}';
|
|
151
155
|
jq.run(q, data.toString(), { input: 'string' })
|
|
152
156
|
.then((data) => {
|