GithubHelp home page GithubHelp logo

ssubedir / docker-firestore-emulator-with-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthewkrupnik/docker-firestore-emulator-with-ui

0.0 0.0 0.0 67 KB

Shell 11.56% JavaScript 76.24% Dockerfile 12.20%

docker-firestore-emulator-with-ui's Introduction

Intro

Fork of https://github.com/matthewkrupnik/docker-firestore-emulator-with-ui to expose the ports of the emulator through environment variables

Container is running Alpine linux with Node LTS, Bash, and Openjdk11 installed. Container installs the firebase-toolkit from npm. It also installs the firestore, pubsub, andfunctions emulator and turns on the UI.

Execute container

docker run -p 8080:8080 -p 4000:4000 -p 8085:8085 -p 5001:500 -p 5005:5005 matthewkrupnik/docker-firestore-emulator-with-ui

Execute the container exposing the firestore server on the port 8200 instead of the standard 8080 docker run -e FIRESTORE_PORT=8200 -p 8200:8200 -p 4000:4000 -p 8085:8085 -p 5001:5001 -p 5005:5005 matthewkrupnik/docker-firestore-emulator-with-ui

Env variables and ports

  • FIRESTORE_PORT default to 8080
  • FIRESTORE_WS_PORT default to 5005
  • UI_PORT default to 4000
  • PUSUB_PORT default to 8085
  • FUNCTIONS_PORT default to 5001

Mountpoints

  • firestore.indexes.json is found at /firebase/firestore.indexes.json
  • firestore.rules is found at /firebase.rules
  • functions need to be loaded at /firestore/functions

Firestore

To use firestore emulator the environment variable needs to be set. FIRESTORE_EMULATOR_HOST="localhost:8080"

Note the emulator is setup to run in singleproject mode with the project name: "dummy-project"

PubSub

PUBSUB_EMULATOR_HOST="localhost:8085"

Functions

You functions folder needs to be volume mounted to /firestore/functions. The following npm packages are required:

  • "firebase-admin": "^8.10.0",
  • "firebase-functions": "^3.6.1"

The container will run an npm install on the functions repository and the settings are as follows:

"functions": {
    "predeploy": [
      "npm --prefix ./functions run lint",
      "npm --prefix ./functions run build"
    ],
    "source": "functions"
  }

docker-firestore-emulator-with-ui's People

Contributors

matthewkrupnik avatar chrsin avatar dependabot[bot] avatar blastdan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.