From 847a0e1d6549aab6bff99026bd76b799b3255083 Mon Sep 17 00:00:00 2001 From: yash Date: Wed, 15 May 2024 17:32:48 +0530 Subject: [PATCH] rfac: docker-compose file rfac: env.list.example rfac: contributing.md --- CONTRIBUTING.md | 7 +++---- docker-compose.yaml | 6 +++--- env.list.example | 2 +- frontend/Dockerfile.frontend | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 174e61f..be778fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,15 +34,14 @@ cd Tracer #### Create env.sh from env.sh.example -#### Install node-modules -``` -npm ci -``` + #### Run Frontend ``` source env.sh cd frontend +# only first time to install node-modules +npm ci npm start ``` diff --git a/docker-compose.yaml b/docker-compose.yaml index 32516fd..5860068 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -51,14 +51,14 @@ services: context: ./frontend dockerfile: Dockerfile.frontend container_name: tracer-frontend - network_mode: host + networks: + - network env_file: - env.list ports: - "3000:3000" restart: unless-stopped - volumes: - - .:/app + postgres: image: postgres:latest diff --git a/env.list.example b/env.list.example index 95c16ca..c75c15a 100644 --- a/env.list.example +++ b/env.list.example @@ -1,5 +1,5 @@ CLIENT_ID= -BACKEND_URL=http://localhost:8080 +BACKEND_URL=http://{ip address of system}:8080 AVATAR_API= diff --git a/frontend/Dockerfile.frontend b/frontend/Dockerfile.frontend index 7a3daac..d813e4b 100644 --- a/frontend/Dockerfile.frontend +++ b/frontend/Dockerfile.frontend @@ -1,6 +1,5 @@ - - FROM node:13.12.0-alpine as build + WORKDIR /app COPY . . RUN npm install