-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Firebase emulator docker container
- Loading branch information
Showing
4 changed files
with
86 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"emulators": { | ||
"ui": { | ||
"enabled": true, | ||
"host": "0.0.0.0", | ||
"port": 4000 | ||
}, | ||
"firestore": { | ||
"port": "8088", | ||
"host": "0.0.0.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
################################################################################ | ||
# Development containers only to support local development, testing, and CI. | ||
# | ||
# This docker-compose file is meant to be used with src/api/docker-compose.yml | ||
# as a base specification: | ||
# | ||
# $ docker-compose -f docker-compose.yml -f development.yml up -d | ||
# | ||
# See https://docs.docker.com/compose/production/ | ||
################################################################################ | ||
version: '3' | ||
|
||
services: | ||
# Firebase Emulator for offline testing | ||
firebase: | ||
container_name: 'firebase' | ||
image: andreysenov/firebase-tools | ||
volumes: | ||
# Copy firebase.config into the container so we get proper ip/port binding | ||
- ./config/firebase.json:/home/node/firebase.json | ||
command: firebase emulators:start --project telescope --only firestore | ||
ports: | ||
# Emulator Suite UI | ||
- '4000' | ||
# Cloud Firestore | ||
- '8088:8088' | ||
depends_on: | ||
- traefik | ||
labels: | ||
# Enable Traefik on the firebase container | ||
- 'traefik.enable=true' | ||
# Traefik routing for the firebase UI at http://ui.firebase.localhost | ||
- 'traefik.http.routers.firebase_ui.rule=Host(`ui.firebase.localhost`)' | ||
- 'traefik.http.routers.firebase_ui.service=firebase_ui' | ||
- 'traefik.http.services.firebase_ui.loadbalancer.server.port=4000' | ||
# Traefik routing for the Firebase Firestore at http://firestore.firebase.localhost | ||
- 'traefik.http.routers.firebase_firestore.rule=Host(`firestore.firebase.localhost`)' | ||
- 'traefik.http.routers.firebase_firestore.service=firebase_firestore' | ||
- 'traefik.http.services.firebase_firestore.loadbalancer.server.port=8088' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters