From 29c14cf2da0d7380fea19c6cf9f48f825d057f9b Mon Sep 17 00:00:00 2001 From: Steven Hollingsworth Date: Fri, 12 May 2023 07:39:10 -0700 Subject: [PATCH] Fixes #127 - removed unnecessary backend components, added docker run to README --- README.md | 5 +++ bin/runfrontend.sh | 3 +- localdev/docker-compose.yaml | 80 ++++++++++++++++++------------------ 3 files changed, 48 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 73652bf..82037d5 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ Trash AI is a web application where users can upload photos of litter, which wil You can simply go to www.trashai.org to start using the tool or deploy it yourself. Current self-deployment options are local deployment with docker to remote on Amazon Web Services (AWS). +### [Run Local Docker Instance](https://hub.docker.com/r/code4sac/trashai) +``` +docker run -p 5150:5150 -it code4sac/trashai:latest +``` + ### [Local Development](./docs/localdev.md) - Run the environment live with localstack and docker. diff --git a/bin/runfrontend.sh b/bin/runfrontend.sh index b89dfa2..0ab5c6b 100755 --- a/bin/runfrontend.sh +++ b/bin/runfrontend.sh @@ -4,7 +4,8 @@ IFS=$'\n\t' export PATH="$PATH:/node_modules/.bin:/stack/bin:node_modules/.bin" -wait-for-it.sh -t 300 -h backend -p 4000 +# Disabling until backend is needed +# wait-for-it.sh -t 300 -h backend -p 4000 cd /stack/frontend while true; do yarn diff --git a/localdev/docker-compose.yaml b/localdev/docker-compose.yaml index 469d159..6a7cc19 100644 --- a/localdev/docker-compose.yaml +++ b/localdev/docker-compose.yaml @@ -1,24 +1,25 @@ version: "3.9" services: - localstack: - image: localstack/localstack:0.13.3 - ports: - # - "127.0.0.1:53:53" # only required for Pro - # - "127.0.0.1:53:53/udp" # only required for Pro - # - "127.0.0.1:443:443" # only required for Pro - - "127.0.0.1:4510-4530:4510-4530" - - "127.0.0.1:4566:4566" - - "127.0.0.1:4571:4571" - environment: - - LOCALSTACK_TMP_FOLDER=/tmp/trash-ai-localstack-tmp/ - - LOCALSTACK_DATA_DIR=/tmp/trash-ai-localstack-persist/ - volumes: - - ${LOCALSTACK_TMP_FOLDER}:/tmp/localstack - - ${LOCALSTACK_DATA_DIR}:/tmp/localstack_persist - - "/var/run/docker.sock:/var/run/docker.sock" - - restart: always + # Disabling backend components util needed again + # localstack: + # image: localstack/localstack:0.13.3 + # ports: + # # - "127.0.0.1:53:53" # only required for Pro + # # - "127.0.0.1:53:53/udp" # only required for Pro + # # - "127.0.0.1:443:443" # only required for Pro + # - "127.0.0.1:4510-4530:4510-4530" + # - "127.0.0.1:4566:4566" + # - "127.0.0.1:4571:4571" + # environment: + # - LOCALSTACK_TMP_FOLDER=/tmp/trash-ai-localstack-tmp/ + # - LOCALSTACK_DATA_DIR=/tmp/trash-ai-localstack-persist/ + # volumes: + # - ${LOCALSTACK_TMP_FOLDER}:/tmp/localstack + # - ${LOCALSTACK_DATA_DIR}:/tmp/localstack_persist + # - "/var/run/docker.sock:/var/run/docker.sock" + # + # restart: always build_img: image: trash_ai_bs @@ -26,26 +27,27 @@ services: context: ../ dockerfile: localdev/Dockerfile - bootstrap: - image: trash_ai_bs - env_file: ./.env - volumes: - - ../:/stack - command: /stack/bin/runbootstrap.sh - depends_on: - - build_img + # Disabling backend components util needed again + # bootstrap: + # image: trash_ai_bs + # env_file: ./.env + # volumes: + # - ../:/stack + # command: /stack/bin/runbootstrap.sh + # depends_on: + # - build_img - backend: - image: trash_ai_bs - env_file: ./.env - volumes: - - ../:/stack - command: /stack/bin/runbackend.sh - links: - - "bootstrap" - ports: - - ${VITE_BACKEND_PORT}:${VITE_BACKEND_PORT} - restart: always + # backend: + # image: trash_ai_bs + # env_file: ./.env + # volumes: + # - ../:/stack + # command: /stack/bin/runbackend.sh + # links: + # - "bootstrap" + # ports: + # - ${VITE_BACKEND_PORT}:${VITE_BACKEND_PORT} + # restart: always frontend: image: trash_ai_bs @@ -53,8 +55,8 @@ services: volumes: - ../:/stack command: /stack/bin/runfrontend.sh - links: - - "backend" + # links: + # - "backend" environment: VITE_GOOGLE_MAPS_API_KEY: ${VITE_GOOGLE_MAPS_API_KEY-:"NOGOOGLEKEY"}