About | Initial steps | OS | Local env | Bash scripts | Bash shell | DB actions
- this setup is best suited for development inside
Docker - VSCode's
Dev Containersextension will be useful
flowchart TD
CAT --> |cat-db container| Mongo
CAT --> |cat-api container| Node
CAT --> |cat-fe container| React
CAT --> |cat-shared container| Shared
CAT --> |cat-stripe container| Stripe
- make sure you have
Dockerup on your machine - ask for
environment variables
127.0.0.1 host.docker.internal
git clone https://<PAT>@github.com/Karmello/cat-start.git
PAT=...
NODE_ENV=development
CLIENT_PORT=3000
SERVER_PORT=8000
API_PORT=9000
API_PORT_TEST=10000
LOCAL_PROD_PORT=11000
FE_URL=http://cat-fe:3000
API_URL=http://cat-api:9000
API_PATH=/api
MONGO_USER=...
MONGO_PASS=...
MONGO_URI=mongodb://cat-db:27017/db
MONGO_URI_LOCAL=mongodb://cat-db:27017/db
MONGO_URI_TEST=mongodb://cat-db:27017/db-test
MONGO_URI_DEV=...
MONGO_URI_STAGING=...
MONGO_URI_PROD=...
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_BUCKET_URL=https://cat-local.s3.eu-central-1.amazonaws.com
AWS_BUCKET_NAME=cat-local
FULL_ACCOUNT_PAYMENT_REQUIRED=no
STRIPE_API_KEY=
DONATION_PAYMENT_LINK=https://buy.stripe.com/test_6oEaInftt7vj3cYfZ1
FULL_ACCOUNT_PAYMENT_LINK=
AUTH_SECRET=...
EMAIL_USER=cat.web.app@gmail.com
EMAIL_PASS=...
ADMIN_USER_ID=678806d4274e9d0b993be702
RECAPTCHA_SITE_KEY=...
HONEYBADGER_API_KEY=...
OPENAI_API_KEY=...
docker compose up --detach cat-stripe
docker compose up --detach cat-db
docker compose build --no-cache cat-api
docker compose up --detach cat-api
docker compose build --no-cache cat-fe
docker compose up --detach cat-fe
docker compose build --no-cache cat-shared
docker compose up --detach cat-shared
cmd/down
cmd/build
cmd/up
http://localhost:9100
http://localhost:8100/info
http://localhost:3100
docker exec -it cat-fe /bin/bash
docker exec -it cat-api /bin/bash
docker exec -it cat-shared /bin/bash
heroku run bash -a cat-api-development
- there's
dbfolder in the root of API repository - it contains ready scripts to perform all sorts of db actions
seed | seed-static | empty | check | notify | copyto | edit
local | dev | staging | prod
yarn db local seed
yarn db prod check
yarn db prod copyto staging