Autostart firebase emulators
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?
@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?
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