Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile
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"]
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the --open option needed?



EXPOSE 3000
# if facing error while building image, paste there two command in terminal.

# export DOCKER_BUILDKIT=0
#export COMPOSE_DOCKER_CLI_BUILD=0
Copy link
Contributor

Choose a reason for hiding this comment

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

it's important to be consistent:

Suggested change
#export COMPOSE_DOCKER_CLI_BUILD=0
# export COMPOSE_DOCKER_CLI_BUILD=0

20 changes: 20 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'
services:
react-app:
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

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

appwrite is spelled wrong.

stdin_open: true
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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?