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

Autostart firebase emulators #32

Open
levino opened this issue Sep 22, 2022 · 2 comments
Open

Autostart firebase emulators #32

levino opened this issue Sep 22, 2022 · 2 comments

Comments

@levino
Copy link

levino commented Sep 22, 2022

I have the problem that I cannot overwrite the CMD in github actions when I use this image as a service container. This makes me think: Who does not want the emulators to start when they run this container? Usually it is supposed to be some kind of service that enables local tests or something. Like a database. A database container also starts the database without having to provide mongodb as a command or something. So why not auto-run the emulators on start by using firebase emulators:start as the CMD?

@alinturbut
Copy link

@levino have you managed to make it autostart?

I am running:

command: >
          firebase init emulators
          && firebase login
          && firebase emulators:start

and getting Failed to authenticate, have you run firebase login?

@alinturbut
Copy link

Managed to find a working docker-compose solution by only starting the Auth and Firestore (they don't require authentication)

version: '3.8'
services:
  firebase:
    image: andreysenov/firebase-tools:latest
    hostname: firebase
    volumes:
      - ../firebase/:/home/node
    user: node
    command: >
          firebase emulators:start --only auth,firestore
    ports:
      - 127.0.0.1:4000:4000 # emulator suite ui
      - 127.0.0.1:9005:9005 # cli login
      - 127.0.0.1:8080:8080 # firestore
      - 127.0.0.1:9099:9099 # auth
      - 127.0.0.1:9199:9199 # cloud storage

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