Skip to content

Commit

Permalink
Prepare and document a deployment on Firebase. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcorpet authored Jan 21, 2019
1 parent c13de2d commit a20cadb
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ models/notebooks/cache
.env

# Build
dist
web-app/frontend/dist/*
/frontend/public/

# NPM
node_modules
Expand All @@ -34,3 +33,6 @@ data/private/*
# Terraform local state
**/.terraform/
**/*.tfstate*

# Firebase Cache
**/.firebase/
5 changes: 5 additions & 0 deletions frontend/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "encompass-bayes"
}
}
12 changes: 12 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,15 @@ When the shape of an API endpoint changes, or when available service areas chang
```sh
yarn test
```

## Firebase

To deploy it as a standalone frontend on Firebase:

```sh
docker-compose build frontend
docker-compose run --rm frontend bash -c "cp dist/* public/"
cd frontend
firebase deploy
cd -
```
16 changes: 16 additions & 0 deletions frontend/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}

0 comments on commit a20cadb

Please sign in to comment.