Go to file
Valentin 574a3e49da automatically create db and remove bd auth 2024-11-19 21:37:46 +01:00
.env.example automatically create db and remove bd auth 2024-11-19 21:37:46 +01:00
.gitignore first commit 2024-05-03 19:02:25 +02:00
README.md automatically create db and remove bd auth 2024-11-19 21:37:46 +01:00
docker-compose.yml automatically create db and remove bd auth 2024-11-19 21:37:46 +01:00

README.md

Directus on Mariadb running with Docker for local development

Run

Create the .env file following .env.example.

To generate the SECRET and KEY

head -c 16 /dev/urandom | od -An -tx1 | tr -d ' \n'

docker-compose up -d

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 .