Add node-firestore-import-export to docker container.

Add data to import.
This commit is contained in:
2019-03-03 12:19:26 +07:00
parent 22ae5f09d2
commit 183bb16395
4 changed files with 151 additions and 1 deletions

View File

@@ -12,6 +12,21 @@ This is project based on [tproger course](https://tproger.ru/video/building-vuej
yarn install
```
### Importing data to firestore
To achieve this goal we use [node-firestore-import-export library](https://www.npmjs.com/package/node-firestore-import-export).
1. Create `docker-compose.override.yml` and add this content to it
```
version: '3'
services:
app:
volumes:
- ~/path/to/firebase/credentials.json:/var/www/credentials.json
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/var/www/cred.json
```
1. Run `docker-compose exec app firestore-import --yes --backupFile /var/www/vue/data/back-up.json`
### Compiles and hot-reloads for development
```
yarn run serve