Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence in docker compose #4

Open
perelin opened this issue Dec 4, 2022 · 1 comment
Open

Persistence in docker compose #4

perelin opened this issue Dec 4, 2022 · 1 comment

Comments

@perelin
Copy link

perelin commented Dec 4, 2022

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

@amanfrinati
Copy link

amanfrinati commented May 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants