firebase-emulator
firebase-emulator copied to clipboard
Persistence in docker compose
Hi,
I did not manage to persist the emulator data when using docker compose. Used a docker volume and added --import=./<volume-name> --export-on-exit
to the firebase emulators:start
command. On exiting docker compose with CTRL-C no data is exported.
Any ideas?
Regards, Sebastian
Hi @perelin,
you just mount the firebase
folder. I do this in my project:
volumes:
firebase-data:
services:
firebase:
build:
context: https://github.com/seletskiy/firebase-emulator.git
volumes:
- firebase-data:/firebase
ports:
- "9199:9199"
- "4000:4000"
During the stopping phase the firebase emulators:export
command save the state in a emulators.data
file.