From e052c4ac609a6fff0994c324136d01a4b90e1266 Mon Sep 17 00:00:00 2001 From: NextGenOP <60586402+NextGenOP@users.noreply.github.com> Date: Sun, 12 Feb 2023 13:13:12 +0700 Subject: [PATCH 1/4] Create .dockerignore --- .dockerignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a45be33 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +node_modules +build +*.lock From b60af138b002171f03940552d17ccb12c2469f14 Mon Sep 17 00:00:00 2001 From: NextGenOP Date: Mon, 13 Feb 2023 08:49:19 +0700 Subject: [PATCH 2/4] Add some healthcheck --- docker-compose.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 31c79c0..610162a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,7 +8,14 @@ services: ports: - '5432:5432' environment: + - 'POSTGRES_USER=postgres' + - 'POSTGRES_DB=todo-list' - 'POSTGRES_PASSWORD=root' + volumes: + - postgresdata:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] + app-backend: container_name: app-backend build: @@ -17,7 +24,8 @@ services: image: 'backend-todolist:1.0.0' restart: always depends_on: - - postgresql-backend + postgresql-backend: + condition: service_healthy ports: - '8002:8002' environment: From 1044c5d4632ebd34417bcb211209296b61648e48 Mon Sep 17 00:00:00 2001 From: NextGenOP Date: Wed, 15 Feb 2023 11:28:32 +0700 Subject: [PATCH 3/4] Place at top and sort --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f1f272f..7c7e998 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,12 @@ FROM node:18.14.0-alpine RUN mkdir app WORKDIR /app +ARG REACT_APP_NODE_ENV +ARG REACT_APP_BASE_URL + +ENV REACT_APP_NODE_ENV="production" +ENV REACT_APP_BASE_URL="http://localhost:8002/api/v1" + COPY . . RUN yarn RUN yarn build @@ -11,5 +17,3 @@ CMD serve -s build EXPOSE 3000/tcp -ENV REACT_APP_NODE_ENV="production" -ENV REACT_APP_BASE_URL="http://localhost:8002/api/v1" From 38695e6b5bc250c80a382686a73296532449a191 Mon Sep 17 00:00:00 2001 From: NextGenOP Date: Wed, 15 Feb 2023 11:37:42 +0700 Subject: [PATCH 4/4] Class Name Error fix --- src/components/UI/ProfilePicture.jsx | 2 +- src/pages/NotFound.page.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/UI/ProfilePicture.jsx b/src/components/UI/ProfilePicture.jsx index 1f817a5..43ff771 100644 --- a/src/components/UI/ProfilePicture.jsx +++ b/src/components/UI/ProfilePicture.jsx @@ -4,7 +4,7 @@ const ProfilePicture = ({ classPhoto, classAvatar, tabIndex }) => { return (
{ return (

Page Not Found!

- + Go back