- The original version of friendworld included a backend, built in postgresql with postgraphile used to generate a graphql api. A small node service was used to handle chat and post bots.
(Using node v10.2.1)
- Run all of the files in
./api/sql
against a postgres db
- Add a
.env
file to./api
with the following environment variabels set:SQL_PASSWORD
,JWT_SECRET
,STEVE_JWT
,DUMBO_JWT
,FUCKFACE_JWT
,VINCE_JWT
,HEATHER_JWT
. The JWT variables should be the login JWTs for userssteve
,DumboTheClown
,vinceslickson
, andheatherhot6
. These must be set for the chat bots to work properly. cd ./api && npm install && npm run dev:start
cd ./ui && npm start
- Revert commit
e7eb21e
, which made the site read-only
- (I already have a
friendworld
gcp project set up for this with a closed billing account) - Create a new gcp project for friendworld.
- Create a bucket called
envvars-<PROJECT NAME>
- Create App Engine and Cloud SQL instances
- update the
cloud_sql_instances
property in./api/app.yaml
- Run all of the files in
./api/sql
against a postgres db. To ssh into the db, rungcloud sql connect <DB NAME> --user=postgres --quiet
- See
Cloud_SQL_Export...
in the root directory for the latest db dump - install: https://cloud.google.com/sdk/docs/quickstart-macos
gcloud init
in friendworld directory
- Add a
.env
file to./api
with the following environment variabels set:SQL_PASSWORD
,JWT_SECRET
,STEVE_JWT
,DUMBO_JWT
,FUCKFACE_JWT
,VINCE_JWT
,HEATHER_JWT
. The JWT variables should be the login JWTs for userssteve
,DumboTheClown
,vinceslickson
, andheatherhot6
. These must be set for the chat bots to work properly. - upload
.env
to theenvvars-<PROJECT NAME>
bucket - Update the prod DB_URL
host
property in./api/src/config.ts
cd api
npm run build && npm run deploy
gcloud app logs tail -s default
- Update the prod api url in
./ui/src/index.tsx
cd ui
npm run build && npm run deploy
- There probably needs to be some setup for firebase in here
- (from root)
firebase deploy