-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b99867f
commit 401526a
Showing
4 changed files
with
60 additions
and
0 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,20 @@ | ||
FROM node:21-slim | ||
|
||
ENV FIREBASE_TOOLS_VERSION=12.8.0 | ||
WORKDIR /firebase | ||
|
||
RUN yarn global add firebase-tools@${FIREBASE_TOOLS_VERSION} && \ | ||
yarn cache clean && \ | ||
firebase -V | ||
|
||
RUN apt update && apt install -y curl && rm -rf /var/cache/apk/* | ||
|
||
RUN firebase setup:emulators:ui | ||
|
||
COPY --link firebase.json /firebase/firebase.json | ||
COPY --link entrypoint.sh /firebase/entrypoint.sh | ||
|
||
EXPOSE 4000 | ||
EXPOSE 9099 | ||
|
||
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 |
---|---|---|
@@ -1,2 +1,18 @@ | ||
# firebase-auth-emulator | ||
|
||
Firebase Auth Emulator Container Image | ||
|
||
Reference: https://github.com/seletskiy/firebase-emulator/tree/master | ||
|
||
## Usage | ||
|
||
```bash | ||
docker run -it --rm \ | ||
-p 4000:4000 \ | ||
-p 9099:9099 \ | ||
ghcr.io/timfanda35/firebase-auth-emulator | ||
``` | ||
|
||
- Emulator UI: http://127.0.0.1:4000 | ||
- Firebase Auth API Prefix: `http://127.0.0.1:9099/identitytoolkit.googleapis.com/v1` | ||
- project id: `firebase-auth-emulator` |
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
data_dir=emulators.data | ||
firebase_project_id=firebase-auth-emulator | ||
|
||
exec firebase emulators:start 2>&1 \ | ||
$([ -d $data_dir ] && echo "--import $data_dir") \ | ||
--project "$firebase_project_id" |
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,14 @@ | ||
{ | ||
"emulators": { | ||
"auth": { | ||
"enabled": true, | ||
"host": "0.0.0.0", | ||
"port": 9099 | ||
}, | ||
"ui": { | ||
"enabled": true, | ||
"host": "0.0.0.0", | ||
"port": 4000 | ||
} | ||
} | ||
} |