1 Setup Docker
partisan edited this page 2025-01-12 11:39:12 +01:00

Setup for Docker

Prerequisites


Building the Docker Image

  1. Clone the repository:

    git clone https://weforge.xyz/Spitfire/Search.git
    cd Search
    
  2. Build the Docker image:

    docker build -t qgato .
    

Running the Container

Using Command-Line Flags

You can pass configuration options directly as environment variables when running the container:

  1. Run the container with flags for PORT and DOMAIN:

    docker run -d -p 5000:5000 --name qgato \
      -e PORT=5000 \
      -e DOMAIN=localhost \
      qgato
    
  2. Access the application at:
    http://localhost:5000


Using a Pre-Configured config.ini

  1. Modify or create the config.ini file in the cloned repository to include your desired settings.

  2. Mount the config.ini file into the container:

    docker run -d -p 5000:5000 --name qgato \
      -v $(pwd)/config.ini:/home/myuser/Search/config.ini \
      qgato
    

This method avoids the need to pass environment variables as flags during runtime.


Exposed Port

The application listens on port 5000 by default. You can map it to any port on your host system using the -p flag during docker run.


Stopping and Removing the Container

  • Stop the container:

    docker stop qgato
    
  • Remove the container:

    docker rm qgato
    

That's it! Your QGato instance is now running inside a Docker container.