diff --git a/README.md b/README.md index be45d64..50fd4bf 100644 --- a/README.md +++ b/README.md @@ -20,45 +20,19 @@ Follow these instructions to set up and run the website locally using Docker. cd SECQUOIA.github.io ``` -2. **Create a Dockerfile** - - Create a file named `Dockerfile` with the following content: - - ```dockerfile - FROM ruby:3.2 - WORKDIR /app - COPY . . - RUN gem install bundler && bundle install - EXPOSE 4000 - CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"] - ``` - -3. **Create a Gemfile** - - Create a file named `Gemfile` with the following content: - - ```ruby - source "https://rubygems.org" - - gem "jekyll", "~> 4.0.0" - gem "mercenary", "~> 0.3.6" - gem "webrick" - gem "forty_jekyll_theme", path: "." - ``` - -4. **Build the Docker image** +2. **Build the Docker image** ```bash docker build -t secquoia-website . ``` -5. **Run the website locally** +3. **Run the website locally** ```bash - docker run -p 4000:4000 -v "$(pwd)":/app secquoia-website + docker run --rm -it -p 4000:4000 -v "$(pwd)":/app secquoia-website ``` -6. **View the website** +4. **View the website** Open your web browser and go to [http://localhost:4000](http://localhost:4000) @@ -74,7 +48,7 @@ When making changes to the website: To enable live reloading, stop any running containers and run: ```bash -docker run -p 4000:4000 -v "$(pwd)":/app jekyll-site bundle exec jekyll serve --livereload --host 0.0.0.0 +docker run --rm -it -p 4000:4000 -v "$(pwd)":/app secquoia-website bundle exec jekyll serve --livereload --host 0.0.0.0 ``` ### Building for Production @@ -82,11 +56,28 @@ docker run -p 4000:4000 -v "$(pwd)":/app jekyll-site bundle exec jekyll serve -- To build the site for production: ```bash -docker run -v "$(pwd)":/app jekyll-site bundle exec jekyll build +docker run --rm -v "$(pwd)":/app secquoia-website bundle exec jekyll build ``` The built site will be in the `_site` directory, which can be deployed to any static hosting service. +### Native Ruby (Optional) + +If you prefer not to use Docker: + +```bash +bundle install +bundle exec jekyll serve --livereload +``` + +### Validation + +Run the repository validation script before opening a PR: + +```bash +./validate.sh +``` + ### Troubleshooting - If you encounter permission issues with Docker, ensure your user is added to the Docker group: @@ -100,10 +91,6 @@ The built site will be in the `_site` directory, which can be deployed to any st docker build --no-cache -t secquoia-website . ``` -### Important Note - -The Dockerfile, Gemfile, and other development configuration files are gitignored to keep the repository clean. You'll need to recreate them when setting up a new development environment. - ## Image Policy (WebP Usage) We store original images (PNG/JPG/etc.) in the repository for provenance, but **only WebP images should be referenced in the built site**.