Newer
Older
```
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose --profile init up
```
## Run
Before running anything, create a file named `auth.env` where you set the database user and password by defining the environment variable `NEO4J_AUTH=<user>/<password>` where you replace `<user>` and `<password>` by the right values. If the database does not exist, those values will be used to create it.
### Run dev
NODE_ENV="dev" USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose --profile dev up
```
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose --profile api-standalone up
```
```
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose --profile db-standalone up
```
```
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose --profile db-standalone rm
sudo rm -rf neo4j/data
```
### Export database
Run docker compose in such a way:
```
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose run --rm neo4j-import neo4j-admin database dump neo4j --to-path=/import/
```
### Import database
Run docker compose in such a way:
```
docker compose run --rm neo4j-import neo4j-admin database load neo4j --from-path=/import/ --overwrite-destination=true
```