-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add docker to the local development #29 #30
base: main
Are you sure you want to change the base?
Conversation
@TimidRobot I worked on this issue. Could you give me a review |
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.
Please re-reference the related files in https://github.com/creativecommons/cc-resource-archive
@@ -0,0 +1,23 @@ | |||
version: '3' | |||
services: | |||
jekyll: |
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.
The build section is missing
# Copy the rest of your site files | ||
COPY . . |
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.
better to use mounts instead of copying files
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.
It would be better if this file was based on https://github.com/creativecommons/cc-resource-archive/blob/e00da263989a8f042151a459380469bf9b8cd8ee/dev/jekyll/Dockerfile
node: | ||
image: node:latest # Use an appropriate Node.js image | ||
volumes: | ||
- ../:/usr/src/app # Mount your project directory | ||
working_dir: /usr/src/app | ||
# command: prettier --write docs/index.html # Adjust the file types as needed | ||
|
||
# Add an initialization step to install Prettier before running | ||
# entrypoint: /bin/sh -c "npm install --global prettier && prettier --write docs/index.html" | ||
|
||
#multiple files | ||
entrypoint: /bin/sh -c "npm install --global prettier && prettier --write 'docs/**/*.html'" |
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.
Please remove node service
services: | ||
jekyll: | ||
image: my-jekyll-app:latest | ||
# command: jekyll serve --watch --host 0.0.0.0 |
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.
this line can be deleted
#volumes: | ||
# - .:/srv/jekyll |
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.
better to use mounts instead of copying files
Fixes
Description
This PR adds Docker support to simplify local development by creating a consistent environment across different machines and setups. Docker ensures that all dependencies are installed correctly, reducing issues related to version mismatches and environmental differences. This will make the development process smoother and more reliable for all contributors.
Technical details
Tests
Screenshots
screen-capture.webm
Checklist
Update index.md
).main
ormaster
).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin