feat(backend): selfhosted utopia map (#299)

* describe manual seed

* directus minimal seed & seed instructions

* use api config everywhere, default to localhost, ignore .env file, provide .env.dist

* fix lint

* backend readme: import dump instructions

* complete instructions for seeding

* update readme, fix merge conflict, typos
This commit is contained in:
Ulf Gebhardt 2025-08-14 10:00:23 +01:00 committed by GitHub
parent 42086b9217
commit 85b0f93ab7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,25 @@
To run the backend you can simply execute
`docker-compose up`
To fill in all required data execute the following commands in order:
```
cd backend
npx directus-sync push \
--directus-url http://localhost:8055 \
--directus-email admin@it4c.dev \
--directus-password admin123
npx directus-sync seed push \
--directus-url http://localhost:8055 \
--directus-email admin@it4c.dev \
--directus-password admin123
./directus-config/manual/seed.sh
```
## Pull Data from Docker to Harddrive
In order to pull data from your locally running backend (see [docker-compose](../app/docker-compose.yml)) to your local harddrive, you can run the following command
@ -15,6 +33,7 @@ npx directus-sync pull \
```
## Push Data from Harddrive to Docker
To push local changes or to seed directus use the following command
```
npx directus-sync push \
@ -24,6 +43,7 @@ npx directus-sync push \
```
## Seed Data for local development
Seed the development data via:
```
npx directus-sync seed push \
@ -33,6 +53,7 @@ npx directus-sync seed push \
```
## Seed Data - find differences
In order so see what changes would appear when seeding, you can execute:
```
npx directus-sync seed diff \
@ -46,6 +67,7 @@ npx directus-sync seed diff \
In order to seed files and additional data not covered by `directus-sync` run the script `backend/directus-config/manual/seed.sh`.
## Backup Database
Either keep a copy of the `/data/database` folder or run the following command to get an sql dump
```