Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker module issue Closing #139 #149

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Docker module issue Closing #139 #149

merged 2 commits into from
Apr 14, 2023

Conversation

briswells
Copy link
Contributor

No description provided.

@briswells briswells linked an issue Apr 14, 2023 that may be closed by this pull request
@shubhamlatkar shubhamlatkar removed their request for review April 14, 2023 02:13
@hardikpatil hardikpatil added the bug Something isn't working label Apr 14, 2023
Copy link
Contributor

@jayrevolinskyjr jayrevolinskyjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that it was a me issue before. I followed Hardik's instructions for cleaning out the containers, images, and volumes and then i ran docker compose build --no-cache and docker compose up and it works for me.

Copy link
Contributor

@hardikpatil hardikpatil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, worked on my end. Finally!

Screenshot 2023-04-13 at 19 43 25

@hardikpatil
Copy link
Contributor

I tried docker compose build --no-cache and then docker compose up, but I am still receiving the 'Cannot find module 'sequelize'' error, even after cleansing my docker cache, containers, images, and volumes. I am not sure if this is a me issue or from the node modules. I also think we need to update the readme instructions for building. Sequelize issues

I faced this yesterday, I had to remove all images, all stopped containers and images
docker image prune -a
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q).

@hardikpatil hardikpatil added the dependencies Pull requests that update a dependency file label Apr 14, 2023
@shubhamlatkar
Copy link
Contributor

I tried docker compose build --no-cache and then docker compose up, but I am still receiving the 'Cannot find module 'sequelize'' error, even after cleansing my docker cache, containers, images, and volumes. I am not sure if this is a me issue or from the node modules. I also think we need to update the readme instructions for building. Sequelize issues

I faced this yesterday, I had to remove all images, all stopped containers and images docker image prune -a docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) docker rmi $(docker images -q).

@hardikpatil I wonder where do you got these docker commands from? 🤔
They are very risky and should be used under adult supervision only 😆

Copy link
Contributor

@ysiddhapura ysiddhapura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this branch with the changes, deleted old images, ran docker compose build --no-cache, and docker compose-up and runs for me!

@AbhinavReddy-Dev
Copy link
Contributor

@briswells @shubhamlatkar Can you please let us know the right commands to build and run? Looks like adding --no-cache to build command works, but wanted to know if that is the right way of doing it and if there is a need to update the README to let everyone the change in commands to run the container.

@kbuffardi
Copy link
Contributor

Thanks for your work on this.
There are a lot of files changed here so there's a lot to review. It looks like some of it is just shifting files into different directories. However, can you please give us a breakdown of what changes are included (and why)?

To tag onto @AbhinavReddy-Dev's question, is the proposed solution to use the --no-cache option one time, or every time we rebuild/run docker? Along those lines, are there any different directions that should be updated in README.md?

@briswells
Copy link
Contributor Author

briswells commented Apr 14, 2023

Thanks for your work on this. There are a lot of files changed here so there's a lot to review. It looks like some of it is just shifting files into different directories. However, can you please give us a breakdown of what changes are included (and why)?

To tag onto @AbhinavReddy-Dev's question, is the proposed solution to use the --no-cache option one time, or every time we rebuild/run docker? Along those lines, are there any different directions that should be updated in README.md?

@AbhinavReddy-Dev @kbuffardi Most of the changes are just moving the code from backend into a src folder and updated paths. I update the dockerfile's to copy the tsconfig.json files to their respective containers, updated the mounts in docker-compose to be the src directories and updated the path in backend/package.json to reflect the update with src directory.

Docker compose build --no-cache will only need to be run once to fix any issues with legacy code hanging around in places it's not suppose to be. After that you should only need to run docker compose build when a new node module is installed. Anyone who is building the container fresh would NOT need to run docker compose build --no-cache, just docker compose build

@jayrevolinskyjr
Copy link
Contributor

The README on the main branch is lacking docker compose build as an instruction. I am of the mindset that we should not include the pruning commands on the README since we will be assuming that anyone who clones a fresh repo will not have any dangling images or cache issues related to PantryNode.

@kbuffardi
Copy link
Contributor

I am of the mindset that we should not include the pruning commands on the README since we will be assuming that anyone who clones a fresh repo will not have any dangling images or cache issues related to PantryNode.

100% agree and I'm hoping that the proposed solution only involves pruning images and clearing cache for people currently working on the project. I hope our solution is sustainable and simple. Moreover, as acknowledged in the discussion, those commands might be effective but they are a bit dangerous to suggest to anyone who might want to work on the project in the future -- they involve deleting all images/containers, even those that don't belong to the project. That can be particularly troublesome for people who are also using Docker on other projects.

But if that is a non-issue with the proposed solution... that's a good sign!

@briswells
Copy link
Contributor Author

I’m going to merge this with main and open a new issue to update the readme, and rename docker containers to more appropriate names.

@briswells briswells merged commit d45499b into main Apr 14, 2023
@briswells briswells deleted the docker-module-issue branch April 14, 2023 04:53
briswells added a commit that referenced this pull request Apr 15, 2023
commit dc7032e
Merge: d45499b aab812b
Author: Hardik Patil <[email protected]>
Date:   Fri Apr 14 10:55:20 2023 -0700

    Frontend updates (#140)

    This PR is to merge all the updates from `frontend` to `main` with the
    following features :
    - Donor page UI improvements - @prasannarajezzzy
    - Linter for frontend - @shmansa @AbhinavReddy-Dev
    - Moved .eslintrc.cjs from root to backend directory to resolve plugin
    issues. - @shmansa @AbhinavReddy-Dev
    - Summary page @decoles @abhilashSreenivasa
    - mirageJS support to mock API @sathyanarayanan-v
    - Linter error fix @hardikpatil @jayrevolinskyjr

commit aab812b
Author: hardikpatil <[email protected]>
Date:   Fri Apr 14 01:22:48 2023 -0700

    resolved warnings on the container logs

commit 87909e6
Author: AbhinavReddy-Dev <[email protected]>
Date:   Fri Apr 14 00:45:09 2023 -0700

    remnamed PantryNodeReact to frontend, updated actions.yml, added .env.example file and updated readme for local eslint & .env file usage

commit 59ae5fc
Author: AbhinavReddy-Dev <[email protected]>
Date:   Fri Apr 14 00:45:09 2023 -0700

    remnamed PantryNodeReact to frontend, added .env.example file and updated readme for local eslint & .env file usage

commit 04751ca
Author: hardikpatil <[email protected]>
Date:   Fri Apr 14 00:15:58 2023 -0700

    how to linter test update on readme

commit 1dcf5cb
Author: Hardik Patil <[email protected]>
Date:   Thu Apr 13 22:32:11 2023 -0700

    Linter error on frontend (#150)

    * fix lint error on indent. resolved #147

    * resolved console error on donor page

    * Update actions.yml to handle PR to frontend

    * Update linter.yml to handle PR to frontend

    * changed off to warn: no-explicit-any and no-unused-vars

    * changed CI to false to not consider lint warns as errors

    * changed CI to false in package.json

    * added names to run commands in actions.yml

    * added names to run commands in actions.yml v2

    ---------

    Co-authored-by: Jay Revolinsky <[email protected]>
    Co-authored-by: AbhinavReddy-Dev <[email protected]>

commit 817266c
Merge: af86a69 d45499b
Author: AbhinavReddy-Dev <[email protected]>
Date:   Thu Apr 13 22:04:56 2023 -0700

    conflict resolve: Merge branch 'main' into frontend

commit d45499b
Merge: eb11be4 6839a0b
Author: briswells <[email protected]>
Date:   Thu Apr 13 21:53:10 2023 -0700

    Docker module issue Closing #139 (#149)

commit 6839a0b
Author: Brian S Wells <[email protected]>
Date:   Thu Apr 13 17:33:22 2023 -0700

    Update path for start script

commit 1ea02cf
Author: Brian S Wells <[email protected]>
Date:   Thu Apr 13 17:30:20 2023 -0700

    Updated mounts to not include node modules

commit af86a69
Merge: 16d8afe 6d735ba
Author: Sathya <[email protected]>
Date:   Thu Apr 13 17:04:23 2023 -0700

    Add mirageJS support to mock API (#145)

    I have covered most of the pages to use MirageJS to mock APIs'.

    - I have mocked API for the following pages
         - Sale
         - Feed
         - Login

    Currently MirageJS is enabled on prod. Once we feel that APIs are solid,
    we can enable it only on dev environment.

    Closes #146

    Docs for MirageJS - [Click here!](https://miragejs.com/)

commit 6d735ba
Merge: 1cc370b 16d8afe
Author: Sathya <[email protected]>
Date:   Thu Apr 13 17:00:48 2023 -0700

    Merge branch 'frontend' into mirage-js-integration

commit 16d8afe
Author: David Coles <[email protected]>
Date:   Thu Apr 13 16:51:45 2023 -0700

    Stock Summary Page  (#142)

    * Inital table configuration started #91

    * Tables configured for mobile, interfaces and temp data started #91

    * Test data setup in tables #91

    * Added count from array of data (hopefully can be used later) #91

    * Summary now has scrollable tables and scrolling whole page isnt needed for bigger displays, resizing works well #91

    * updated Summary page to include themed table headers & alternating colors on rows #91

    * BarChart file has been created #91

    * Bar chart fuctionality has been added #91

    * Added bar chart with some data to summary page #91

    * Toggle button has been added, Tables and Charts are separated #91

    * Toggle button has been added, Tables and Charts are separated #91

    * Added comments to toggle functions and states #91

    * tables are set to default active toggle and margin has been added #91

    * made changes to UI, Resolved issue #91

    ---------

    Co-authored-by: Abhilash Sreenivasa <[email protected]>

commit b2b9614
Author: AbhinavReddy-Dev <[email protected]>
Date:   Thu Apr 13 16:27:27 2023 -0700

    no-const-assign in backend lint error fix

commit 250c2b3
Merge: b6fd8e7 eb11be4
Author: AbhinavReddy-Dev <[email protected]>
Date:   Thu Apr 13 16:23:39 2023 -0700

    eslintrc.cjs and linter.yml conflicts resolved

commit 1cc370b
Merge: 41a2692 b6fd8e7
Author: Sathya <[email protected]>
Date:   Thu Apr 13 11:40:19 2023 -0700

    Merge branch 'frontend' into mirage-js-integration

commit 41a2692
Author: Sathya <[email protected]>
Date:   Thu Apr 13 11:37:54 2023 -0700

    resolve conflicts with frontend branch

commit 6d28b4d
Merge: 429cf62 8e6920c
Author: Sathya <[email protected]>
Date:   Thu Apr 13 11:36:57 2023 -0700

    Merge branch 'frontend' into mirage-js-integration

commit 429cf62
Author: Sathya <[email protected]>
Date:   Thu Apr 13 11:31:50 2023 -0700

    Merge branch 'frontend' into mirage-js-integration

commit 3061f1b
Author: Sathya <[email protected]>
Date:   Thu Apr 13 10:32:48 2023 -0700

    add miragejs for all the API routes

commit eb11be4
Author: Anoushka Sharma <[email protected]>
Date:   Thu Apr 13 09:52:11 2023 -0700

    Issue undef1 (#103)

    * .eslintrc.cjs

    * changed eslintrc.cjs

    * changed eslintrc.cjs

    * Changed eslintrc.cjs

    * Changed eslintrc.cjs

    * Unsure of changes to init-models.ts

    * Unsure of changes to init-models.ts

    * Changed eslintrc.cjs

    * Removed all errors and left some as warnings

    * Changed eslintrc.cjs file and ignored some errors

    * Fixed issueundef error

    * Clean Up

    ---------

    Co-authored-by: Anoushka Sharma <[email protected]>
    Co-authored-by: James Krepelka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker compose issues, accessing newly added packages.
7 participants