-
Notifications
You must be signed in to change notification settings - Fork 25
docker files added #46
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||||
| FROM node:18-alpine | ||||||
| WORKDIR '/app' | ||||||
|
|
||||||
| COPY package.json . | ||||||
| RUN npm install | ||||||
|
|
||||||
| COPY . . | ||||||
|
|
||||||
| CMD ["npm","run","dev","-- --open"] | ||||||
|
|
||||||
|
|
||||||
| EXPOSE 3000 | ||||||
| # if facing error while building image, paste there two command in terminal. | ||||||
|
|
||||||
| # export DOCKER_BUILDKIT=0 | ||||||
| #export COMPOSE_DOCKER_CLI_BUILD=0 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's important to be consistent:
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| version: '3' | ||
| services: | ||
| react-app: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't a react app |
||
| restart: always | ||
| build: | ||
| context: ./ | ||
| dockerfile: Dockerfile | ||
| image: app-write | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. appwrite is spelled wrong. |
||
| stdin_open: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this needed? |
||
| ports: | ||
| - '3000:3000' | ||
| networks: | ||
| - app | ||
| volumes: | ||
| - ./src:/app/src | ||
| - ./app/node_modules | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This didn't work. |
||
|
|
||
| networks: | ||
| app: | ||
| driver: bridge | ||
|
Comment on lines
+18
to
+20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be the default? Why do we need to add this? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the
--openoption needed?