Skip to content

Latest commit

 

History

History
169 lines (104 loc) · 3.55 KB

WINDOWS.md

File metadata and controls

169 lines (104 loc) · 3.55 KB

Steps to Set Up and Use the App (Windows Version)

Follow these instructions to set up and run the Urocissa app on a Windows machine.

1. Clone the Repository

First, ensure that you have Git for Windows installed. Then clone the repository using:

git clone https://github.com/hsa00000/Urocissa.git

This will create a folder called ./Urocissa.


2. Install Dependencies

Make sure the following software is installed on your system:

  • ffmpeg: Download FFmpeg from the official FFmpeg website. Extract the downloaded folder, and add the bin directory to your system's PATH environment variable.

  • Rust: Install Rust using the official installer for Windows.

  • Node.js (with npm): Download and install Node.js from the official Node.js website. Make sure npm is included in the installation.


3. Configure Backend Settings

  1. Navigate to the backend directory:

    cd ./Urocissa/gallery-backend
  2. Copy the default config file and fill in the necessary settings:

    copy .env.default .env
    copy Rocket.default.toml Rocket.toml

    .env:

    PASSWORD=password
    SYNC_PATH=./upload
    DISCORD_HOOK_URL=

    Explanation:

    • PASSWORD: Your password for the app.
    • SYNC_PATH: List of directories that the app will watch for new or modified photos.
    • DISCORD_HOOK_URL: (Optional) Fill in your Discord webhook URL to receive error notifications.

    Rocket.toml:

    • port: Default is 5673. You can change this to your desired port number.

4. Build the Backend

Navigate to gallery-backend and build the backend using Cargo:

cargo build --release

5. Configure Frontend Settings

  1. Navigate to the gallery-frontend directory:

    cd ./Urocissa/gallery-frontend
  2. Copy the default frontend config file:

    copy config.default.ts config.ts

    Note: The config.ts file contains advanced settings. You can leave it unchanged unless you need to customize it.


6. Build the Frontend

In the gallery-frontend directory, run:

npm run build

7. Run the Application

Navigate to the gallery-backend directory and run the following command to start the app:

cargo run --release

You can now access the app via http://127.0.0.1:5673 or http://127.0.0.1:<your_port> if you configured a custom port in Rocket.toml.

Update

1. Pull the Latest Changes from the Repository

Navigate to the project directory and pull the latest updates:

git pull

2. Rebuild

If using Docker, follow these steps:

  1. Pull the latest Docker image:

    docker pull hsa00000/urocissa:latest
  2. Run the Docker script:

    bash run_urocissa_docker.sh

This will update and start the updated app.

If you are not using Docker and prefer to build from source, follow these manual steps to update:

Rebuild the Frontend

  1. Navigate to the gallery-frontend directory:

    cd ./Urocissa/gallery-frontend
  2. Build the frontend:

    npm run build

Rebuild the Backend

  1. Navigate to the gallery-backend directory:

    cd ./Urocissa/gallery-backend
  2. Build and run the backend using Cargo:

    cargo run --release

After following these steps, your Urocissa app will be updated to the latest version.