Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 1.91 KB

localdev.md

File metadata and controls

71 lines (54 loc) · 1.91 KB

Local Development

When doing local development, you can run this stack in the background and edit files in the /backend and /frontend directories and the environment with automatically update.

The listening port for the web frontend defaults to http://localhost:5150, The backend is exposed via http://localhost:4000 by default.

These values can be adjusted by editing the localdev env file .env


IMPORTANT

Pushing / merging PR's to any branches with a prefix of aws/ will trigger deployment actions, when developing locally, create a new branch and submit a pull request to aws/trashai-staging


Set up

Operating System Requirements

  • Linux
  • MacOS
  • Windows using WSL2

1. Install Required Software

Optional Software

  • gnu make
    • ubuntu/debian/wsl2: apt-get install build-essential
    • mac: brew install make

2. Install repo

  • Windows: Repo must be inside Ubuntu (i.e. ~/code/trash-ai)
cd ~/
mkdir code
cd code
git clone https://github.com/code4sac/trash-ai

Running the local dev environment

Option 1. Using make in project root:

  • Windows: Make local must be run from a WSL (Ubuntu) terminal
cd trash-ai
make local

Option 2. Using the shell:

cd localdev
# need to make sure the containers are down before starting
docker-compose down
docker-compose up --remove-orphans --build
# down stack
docker-compose down