Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

docker files added #46

Closed
wants to merge 1 commit into from
Closed

Conversation

harshit0571
Copy link

@harshit0571 harshit0571 commented Oct 4, 2022

What does this PR do?

Containerizes the website
(Provide a description of what this PR does.)

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

yes

@vercel
Copy link

vercel bot commented Oct 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
hacktoberfest-2021-landing ✅ Ready (Inspect) Visit Preview Oct 4, 2022 at 10:55AM (UTC)

@harshit0571
Copy link
Author

Screenshot from 2022-10-04 15-54-14

Screenshot from 2022-10-04 15-54-35

@stnguyen90 stnguyen90 linked an issue Oct 12, 2022 that may be closed by this pull request
2 tasks
Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

I'm getting this error trying to run the container:

$ docker compose up
[+] Running 1/0
 ⠿ Container appwrite-hacktoberfest-react-app-1  Created                                                                                                          0.0s
Attaching to appwrite-hacktoberfest-react-app-1
appwrite-hacktoberfest-react-app-1  | 
appwrite-hacktoberfest-react-app-1  | > [email protected] dev
appwrite-hacktoberfest-react-app-1  | > concurrently "npm run dev:only" "npm run tailwind:watch"
appwrite-hacktoberfest-react-app-1  | 
appwrite-hacktoberfest-react-app-1  | [1] 
appwrite-hacktoberfest-react-app-1  | [1] > [email protected] tailwind:watch
appwrite-hacktoberfest-react-app-1  | [1] > cross-env TAILWIND_MODE=watch cross-env NODE_ENV=development postcss src/styles/tailwind.css -o src/styles/tailwind-output.css -w
appwrite-hacktoberfest-react-app-1  | [1] 
appwrite-hacktoberfest-react-app-1  | [0] 
appwrite-hacktoberfest-react-app-1  | [0] > [email protected] dev:only
appwrite-hacktoberfest-react-app-1  | [0] > svelte-kit dev
appwrite-hacktoberfest-react-app-1  | [0] 
appwrite-hacktoberfest-react-app-1  | [0] > spawn Unknown system error -8
appwrite-hacktoberfest-react-app-1  | [0] Error: spawn Unknown system error -8
appwrite-hacktoberfest-react-app-1  | [0]     at ChildProcess.spawn (node:internal/child_process:413:11)
appwrite-hacktoberfest-react-app-1  | [0]     at Object.spawn (node:child_process:743:9)
appwrite-hacktoberfest-react-app-1  | [0]     at ensureServiceIsRunning (/app/node_modules/esbuild/lib/main.js:1766:29)
appwrite-hacktoberfest-react-app-1  | [0]     at Object.build (/app/node_modules/esbuild/lib/main.js:1658:26)
appwrite-hacktoberfest-react-app-1  | [0]     at /app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:50441:54
appwrite-hacktoberfest-react-app-1  | [0]     at Array.map (<anonymous>)
appwrite-hacktoberfest-react-app-1  | [0]     at scanImports (/app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:50441:31)
appwrite-hacktoberfest-react-app-1  | [0]     at async optimizeDeps (/app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:71611:30)
appwrite-hacktoberfest-react-app-1  | [0]     at async runOptimize (/app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:75473:48)
appwrite-hacktoberfest-react-app-1  | [0]     at async Object.createServer (/app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:75502:9)
appwrite-hacktoberfest-react-app-1  | [0] file:///app/node_modules/@sveltejs/kit/dist/chunks/index.js:3355
appwrite-hacktoberfest-react-app-1  | [0]                       throw new Error('Cannot close server before it is initialized');

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.

context: ./
dockerfile: Dockerfile
image: app-write
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?

Comment on lines +18 to +20
networks:
app:
driver: bridge
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?

@@ -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


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?

# 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

- 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.

@Meldiron
Copy link
Contributor

Thank you so much for the PR 🤩. We're adding the hacktoberfest-accepted label to ensure this PR counts towards your Hacktoberfest contributions count. With that said, please stay active on this PR to address any comments once you receive a review. Happy Hacktoberfest! 🎃

@stnguyen90
Copy link
Contributor

Closing stale PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Dockerize the project
3 participants