-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# *Feature Docker* ## ♻️ Current situation & Problem Currently, setting up Firebase emulators requires manual installation and platform-specific scripts, which can cause issues, especially on Windows. This complicates the development process across different environments. ## ⚙️ Release Notes - Added a Docker setup for Firebase emulators with a `Dockerfile` and `docker-compose.yml` for easier cross-platform usage, especially on Windows. - Updated `README.md` with instructions on using Docker for emulators. - Modified `serve:seeded` script in `functions/package.json` to handle execution inside Docker containers. ![image](https://github.com/user-attachments/assets/2dcf33d9-fdce-4b7b-9c61-5320d3bcc078) ![image](https://github.com/user-attachments/assets/93cec4d6-31df-4a15-a2c6-2ddb3187eb3c) ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
- Loading branch information
Showing
6 changed files
with
55 additions
and
1 deletion.
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,15 @@ | ||
FROM node:22-bullseye-slim | ||
|
||
RUN apt update -y && apt install -y openjdk-11-jdk bash curl | ||
|
||
RUN npm install -g firebase-tools | ||
|
||
COPY . . | ||
|
||
RUN npm run prepare | ||
|
||
EXPOSE 5001 9099 8080 9199 4000 | ||
|
||
ENV IN_DOCKER_CONTAINER=true | ||
|
||
ENTRYPOINT ["/bin/bash", "-c", "npm run serve:seeded && sleep infinity"] |
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,5 @@ | ||
This source file is part of the ENGAGE-HF project based on the Stanford Spezi Template Application project | ||
|
||
SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
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,21 @@ | ||
services: | ||
firebase: | ||
container_name: firebase-emulator | ||
build: | ||
context: . | ||
ports: | ||
- 8080:8080 # **FIRESTORE_PORT** | ||
- 5001:5001 # **FUNCTIONS_PORT** | ||
- 9099:9099 # **AUTH_PORT** | ||
- 9199:9199 # **STORAGE_PORT** | ||
- 4000:4000 # **HOSTING_PORT** | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://localhost:8080" ] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 3 | ||
logging: # Log rotation configuration | ||
driver: "json-file" | ||
options: | ||
max-size: "10m" | ||
max-file: "5" |
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,5 @@ | ||
This source file is part of the ENGAGE-HF project based on the Stanford Spezi Template Application project | ||
|
||
SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
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