Host a Wolfree mirror site
Go to file
2023-09-23 13:25:21 +00:00
docusaurus Please consider adding my instance 2023-09-17 20:06:18 +00:00
rust 2023-08-10 2023-08-11 05:09:24 +00:00
.gitattributes 2023-08-10 2023-08-11 05:09:24 +00:00
Dockerfile 2023-08-10 2023-08-11 05:09:24 +00:00
LICENSE 2023-08-10 2023-08-11 05:09:24 +00:00
README.md 2023-08-10 2023-08-11 05:09:24 +00:00

Wolfree Dockerfile: Self-Host a Mirror Site of Wolfree Instances

This repository provides a Dockerfile and instructions for self-hosting a mirror site of Wolfree instances.

Follow the instructions below to control Docker through terminal emulators. Docker will automatically execute the static site generator and run the web server.

Prerequisites

Before getting started, make sure you have the following prerequisites installed on your computer:

  1. Terminal Emulator: If you are unfamiliar with terminal emulators, you can learn how to use them in Command Line Crash Course - Learn Web Development | MDN.

  2. Docker: If you don't have Docker installed, download it from docker.com.

Instructions

Follow the steps below to self-host a mirror site of Wolfree instances:

  1. Build the Docker Image:

    Open your terminal emulator and execute one of the following commands to build the Docker image. Each command downloads the source code from a different web server. If one of the commands fails, try the next one in the list until the build succeeds.

    docker build -t wolfree https://try.gitea.io/wolfree/wolfree-dockerfile.git
    docker build -t wolfree https://codeberg.org/wolfree/wolfree-dockerfile.git
    docker build -t wolfree https://git.disroot.org/wolfree/wolfree-dockerfile.git
    docker build -t wolfree https://next.forgejo.org/wolfree/wolfree-dockerfile.git
    docker build -t wolfree https://git.kiwifarms.net/wolfree/wolfree-dockerfile.git
    docker build -t wolfree http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree/wolfree-dockerfile.git
    
  2. Run the Docker Container:

    Execute the following command in your terminal emulator to run the Docker container:

    docker run -p 80:80 wolfree
    
  3. Wait for Success Messages:

    Wait until Docker outputs success messages similar to the following:

    > docusaurus@0.0.0 serve
    > docusaurus serve --port 80 --host localhost
    
    [SUCCESS] Serving "build" directory at: http://localhost:80/
    
  4. Access Your Mirror Site:

    You can access your mirror site locally on the same computer where the Docker container runs. Open a web browser, navigate to http://localhost/ to access your mirror site, and enter math problems in the text box.

Congratulations! You have successfully self-hosted a mirror site of Wolfree instances.

Local Development

If you wish to contribute to the development of Wolfree instances, follow these steps:

  1. Prepare the Development Environment:

    Install Git and Docker on your local machine. You can download them from the following official websites:

  2. Clone the Repository:

    Run one of the following commands to clone the repository from one of the Gitea and Forgejo servers:

    git clone https://try.gitea.io/wolfree/wolfree-dockerfile.git
    git clone https://codeberg.org/wolfree/wolfree-dockerfile.git
    git clone https://git.disroot.org/wolfree/wolfree-dockerfile.git
    git clone https://next.forgejo.org/wolfree/wolfree-dockerfile.git
    git clone https://git.kiwifarms.net/wolfree/wolfree-dockerfile.git
    git clone http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree/wolfree-dockerfile.git
    
  3. Run the Docker Container:

    After cloning the repository, navigate to the project directory:

    cd wolfree-dockerfile
    

    Then, run the following commands to build the image and run the container:

    docker build --tag wolfree --progress=plain .
    docker run --publish 80:80 --rm wolfree
    

Configuring Wolfree Instances for LibRedirect

To configure Wolfree instances to integrate with LibRedirect, follow these steps:

  1. Clone the Git repository and open the Dockerfile in a text editor.

  2. In the Dockerfile, remove the number sign (#) at the beginning of the RUN command. After removing the number sign, the RUN command should look like this:

    # Optionally, customize Wolfree instances to suit LibRedirect.
    # https://github.com/libredirect/browser_extension/issues/425
    # To integrate Wolfree with LibRedirect, please delete the number sign at the beginning of the following line.
    RUN PATH="$HOME/.cargo/bin:$PATH" cargo run --manifest-path ./rust/wolfree_libredirect_patch/Cargo.toml -- ;
    
  3. Build a Docker image and run a container.

Helpful Resources for New Developers

If you're new to web development, here are some helpful websites and tools to get you started:

  • MDN Web Docs: MDN is a comprehensive resource for web developers. It offers guides, tutorials, and references for various web technologies. It's a great place to learn and explore web development concepts.

  • Web Dev: Web Dev is a learning platform by Google that offers web development courses. It provides practical examples to help you improve your skills.

  • Chrome DevTools - Chrome Developers: Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. It provides powerful features to inspect and debug web applications.

  • TypeScript: JavaScript With Syntax For Types.: TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.

  • Writing Markup with JSX React: JSX is a syntax extension for JavaScript that allows you to write HTML-like markup inside a JavaScript file.

  • Markdown for the component era | MDX: MDX is a format that combines markdown, JSX, JavaScript expressions, and import/export statements in JavaScript modules.

  • Desktop/PC - Privacy Guides: Most Linux distributions have a terminal available by default. You can check out this guide for recommended distributions.

These resources will help you get started and enhance your skills as a web developer. Happy learning!

License

SPDX-License-Identifier: AGPL-3.0-or-later

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.