项目作者: Terkea

项目描述 :
Adoption platform for pets
高级语言: JavaScript
项目地址: git://github.com/Terkea/pet_adoption.git
创建时间: 2021-03-05T18:06:50Z
项目社区:https://github.com/Terkea/pet_adoption

开源协议:GNU General Public License v2.0

下载


Almost 6.5 million animals enter shelters worldwide and 1.5 of which are euthanized. Adopting allows these animals to experience life again.
Pets for you is an online application meant to help find shelter to stray pets. The application was built using React.js and Firebase.

demo

Deploy to Firebase Hosting on merge

Docker Image CI

DEMO: https://pet-adoption-54bb1.web.app/

Installation

Option 1

> Docker

To install it with docker, you only need to run the following command:

dev port 3000

  1. docker-compose up -d --build

prod port 80

  1. docker-compose -f docker-compose.prod.yaml up -d --build

Option 2

> React

  1. # Install the node packages
  2. npm install
  3. # Start the App in Development Mode
  4. npm start

Configuration

Replace the environment variables from .env and enable authentication with email and password.

bucket rules

  1. rules_version = '2';
  2. service firebase.storage {
  3. match /b/{bucket}/o {
  4. match /{allPaths=**} {
  5. allow read, write: if true;
  6. }
  7. }
  8. }

database rules

  1. rules_version = '2';
  2. service cloud.firestore {
  3. match /databases/{database}/documents {
  4. match /{document=**} {
  5. allow read, write;
  6. }
  7. }
  8. }

Firebase router

You need to make sure the rewrites are enabled in your Firebase hosting configuration to redirect all requests to your index.html file. This assumes you are using create-react-app:

  1. {
  2. "hosting": {
  3. "public": "build",
  4. "ignore": [
  5. "firebase.json",
  6. "**/.*",
  7. "**/node_modules/**"
  8. ],
  9. "rewrites": [
  10. {
  11. "source": "**",
  12. "destination": "/index.html"
  13. }
  14. ],
  15. "headers": [
  16. {"source": "/service-worker.js", "headers": [{"key": "Cache-Control", "value": "no-cache"}]}
  17. ]
  18. }
  19. }