clean README
This commit is contained in:
parent
24a99557d7
commit
d17048fcfd
18
README.md
18
README.md
|
|
@ -15,29 +15,47 @@ To generate the `SECRET` and `KEY`
|
|||
A few troubles to run Directus with Docker on MariaDB instead of Postgresql, so we have to create the DB manually on the first launch.
|
||||
|
||||
`docker exec -it PROJECTNAME_Directus_DB /bin/bash`
|
||||
|
||||
`mariadb -u root`
|
||||
|
||||
`CREATE DATABASE directus;`
|
||||
|
||||
`GRANT ALL PRIVILEGES ON directus.* TO 'directus'@'%';`
|
||||
|
||||
`FLUSH PRIVILEGES;`
|
||||
|
||||
`exit;`
|
||||
|
||||
`exit`
|
||||
|
||||
## Import an exported DB
|
||||
|
||||
`docker cp db_export.sql PROJECTNAME_Directus_DB:/root/`
|
||||
|
||||
`docker exec -it PROJECTNAME_Directus_DB /bin/bash`
|
||||
|
||||
`mariadb -u root`
|
||||
|
||||
`drop database directus;`
|
||||
|
||||
`create database directus;`
|
||||
|
||||
`exit;`
|
||||
|
||||
`mariadb -uroot directus < /root/db_export.sql`
|
||||
|
||||
`exit`
|
||||
|
||||
`docker exec -it PROJECTNAME_Directus_DB /bin/sh`
|
||||
|
||||
`npx directus database migrate:latest`
|
||||
|
||||
## Export data model
|
||||
|
||||
`docker exec -it PROJECTNAME_Directus /bin/sh`
|
||||
|
||||
`npx directus schema snapshot ./snapshot.yaml`
|
||||
|
||||
`exit`
|
||||
|
||||
`docker cp PROJECTNAME_Directus:/directus/snapshot.yaml .`
|
||||
|
|
|
|||
Loading…
Reference in New Issue