-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial attempt at firebase emulator in docker
ignore .env add comments lock react-leaflet-draw version fix cors issue by changing ip address for cloud functions remove .env comment out emulator code and remove unneeded db dump file clean up update readme add heading to readme remove db backup and import on emulator start remove token
- Loading branch information
Showing
9 changed files
with
90 additions
and
11 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 |
---|---|---|
|
@@ -37,3 +37,6 @@ __pycache__ | |
|
||
firebase-debug.log | ||
.Rproj.user | ||
|
||
yarn.lock | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: "3.3" | ||
|
||
services: | ||
|
||
# ------------------------------------- | ||
# Firebase Eumulator | ||
# ------------------------------------- | ||
|
||
emulator: | ||
image: cioos/firebase-emulator:latest | ||
build: ./firebase-functions/ | ||
volumes: | ||
- ./firebase-functions/firebase.json:/app/firebase.json:rw | ||
- ./firebase-functions/firestore.rules:/app/firestore.rules | ||
- ./firebase-functions/firestore.indexes.json:/app/firestore.indexes.json | ||
- ./firebase-functions/functions:/app/functions | ||
env_file: | ||
- .env | ||
environment: | ||
FIREBASE_PROJECT: cioos-metadata-form | ||
ports: | ||
- 5002:5002 # Functions emulator | ||
- 9001:9001 # Realtime Database | ||
- 8081:8081 | ||
- 4000:4000 # UI | ||
- 4400:4400 | ||
- 4500:4500 | ||
- 9299:9299 | ||
- 9099:9099 # Authentication emulator | ||
- 9150:9150 |
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,18 @@ | ||
FROM node:lts-alpine AS app-env | ||
|
||
# Install Python and Java and pre-cache emulator dependencies. | ||
RUN apk add --no-cache python3 py3-pip openjdk11-jre bash && \ | ||
npm install -g firebase-tools && \ | ||
firebase setup:emulators:database && \ | ||
firebase setup:emulators:firestore && \ | ||
firebase setup:emulators:pubsub && \ | ||
firebase setup:emulators:storage && \ | ||
firebase setup:emulators:ui && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
WORKDIR /app | ||
|
||
ADD ./entrypoint.sh /app/entrypoint.sh | ||
RUN chmod 755 entrypoint.sh | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] |
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,7 @@ | ||
#!/bin/sh | ||
|
||
echo "Launching emulator with following firebase.json config file" | ||
cat firebase.json | ||
|
||
npm --prefix ./functions install | ||
firebase emulators:start --project=cioos-metadata-form --only=firestore,database,functions,auth |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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