daily-code
daily-code copied to clipboard
docker integration with bind mounts
PR Fixes: #139
I've successfully integrated Bind mounts with docker-compose file. when running 'docker compose watch', if we change any file and save it, the docker image is hot-reloaded.
@hkirat please review and notify me if any change is needed.
Checklist before requesting a review
- [X] I have performed a self-review of my code
@Akash1000x I have already added this feature refer #111
@fasal26 in my pr i added bind mounts using the Compose Watch feature, you don't need to go through multiple setup steps. Simply run docker-compose watch, and everything will be set up for you.
@Akash1000x yeah i can see that but Iam already working on that feature and im waiting for @hkirat to review as he suggested some changes please go through #111
@Akash1000x or @fasal26 , Did you'll try optimising dockerfile by copying package.json , yarn.lock ? like this: COPY package.json yarn.lock ./ RUN yarn install COPY . . (continues..)
An unexpected error occurred: "https://registry.yarnpkg.com/@repo%2feslint-config: Not found". 3.335 info If you think this is a bug, please open a bug report with the information provided in "/src/app/yarn-error.log". 3.335 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. ------ Are you'll facing this issue?
@dishak
if you want to optimize the Dockerfile you have to copy all the package.json file first then yarn install
like this ->
COPY package.json ./
COPY yarn.lock ./
COPY apps/web/package.json ./apps/web/
COPY packages/db/package.json ./packages/db/
COPY packages/store/package.json ./packages/store/
COPY packages/eslint-config/package.json ./packages/eslint-config/
COPY packages/typescript-config/package.json ./packages/typescript-config/
COPY packages/common/package.json ./packages/common/
COPY packages/ui/package.json ./packages/ui/
whene i work on it this work for me. you have to ensure all the package.json file are copied
@Akash1000x , Thank you..
/bounty $40
@Akash1000x , In docker-compose file the following snippet :
develop: watch: - action: sync path: ./ target: /usr/src/app ignore: - node_modules/ - action: rebuild path: package.json
PLEASE CLARIFY: as per this snippet it rebuilds only the package.json file present in root folder and not other package.json. Is it not important to rebuild any package.json files within the project?