From d17048fcfd640b84236b8711e7e878836ca74ce4 Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 3 May 2024 19:04:09 +0200 Subject: [PATCH] clean README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index c865f91..59f126d 100644 --- a/README.md +++ b/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 .`