Refactor environment variables to use process.env in firebase configuration and update .gitignore for environment files
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -26,3 +26,7 @@ dist-ssr
|
|||||||
# Pnpm lock files
|
# Pnpm lock files
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
pnpm-workspace.yaml
|
pnpm-workspace.yaml
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
.env
|
||||||
|
.env*
|
||||||
@@ -1,10 +1,18 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
|
environment:
|
||||||
|
apiKey: ${apiKey}
|
||||||
|
authDomain: ${authDomain}
|
||||||
|
projectId: ${projectId}
|
||||||
|
storageBucket: ${storageBucket}
|
||||||
|
messagingSenderId: ${messagingSenderId}
|
||||||
|
appId: ${appId}
|
||||||
|
measurementId: ${measurementId}
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 3
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
rollback_config:
|
rollback_config:
|
||||||
|
|||||||
14
firebase.ts
14
firebase.ts
@@ -7,13 +7,13 @@ import { getFirestore } from "firebase/firestore";
|
|||||||
// Your web app's Firebase configuration
|
// Your web app's Firebase configuration
|
||||||
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
|
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
|
||||||
const firebaseConfig = {
|
const firebaseConfig = {
|
||||||
apiKey: "AIzaSyDjjh1mePjkVmSq6jSQLQ99bsqIPHuotLU",
|
apiKey: process.env.apiKey,
|
||||||
authDomain: "portfolio-ff4f6.firebaseapp.com",
|
authDomain: process.env.authDomain,
|
||||||
projectId: "portfolio-ff4f6",
|
projectId: process.env.projectId,
|
||||||
storageBucket: "portfolio-ff4f6.firebasestorage.app",
|
storageBucket: process.env.storageBucket,
|
||||||
messagingSenderId: "44240859214",
|
messagingSenderId: process.env.messagingSenderId,
|
||||||
appId: "1:44240859214:web:094f0ab145c1910cde931f",
|
appId: process.env.appId,
|
||||||
measurementId: "G-FLETQXV0G5"
|
measurementId: process.env.measurementId
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize Firebase
|
// Initialize Firebase
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.25.0",
|
"@eslint/js": "^9.25.0",
|
||||||
"@tailwindcss/vite": "^4.1.10",
|
"@tailwindcss/vite": "^4.1.10",
|
||||||
|
"@types/node": "^25.0.3",
|
||||||
"@types/react": "^19.1.2",
|
"@types/react": "^19.1.2",
|
||||||
"@types/react-dom": "^19.1.2",
|
"@types/react-dom": "^19.1.2",
|
||||||
"@vitejs/plugin-react": "^4.5.2",
|
"@vitejs/plugin-react": "^4.5.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user