Skip to content

Commit

Permalink
Adds contribution guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
agersant committed Feb 2, 2025
1 parent baa31f1 commit 77c3136
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
24 changes: 18 additions & 6 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# Contributing

## Compiling and Running Polaris
## Guidelines

Compiling and running Polaris is very easy as it only depends on the Rust toolchain.
While Polaris is free and open-source software, it is not very open to code contributions. The reasons behind this are:
- Polaris is a hobby project. I don't want it to feel like my day job, where I do a lot of code reviews, mentoring and tech leadership.
- I am committed to maintaining this software for a very long time. I would rather maintain code that I mostly wrote myself.

1. [Install Rust](https://www.rust-lang.org/en-US/install.html)
2. Clone the polaris depot with this command: `git clone --recursive https://github.com/agersant/polaris.git`
This still leave room for a few avenues to contribute:
- Help answering questions in the issue tracker.
- Documentation improvements or writing user guides.
- Satellite projects (eg. [docker-polaris](https://github.com/ogarcia/docker-polaris), [polarios](https://gitlab.com/elise/Polarios))
- Bug fixes.

For non-trivial new features, you are welcome to maintain a fork. If you need help finding your way around the code, feel free to open a [discussion thread](https://github.com/agersant/polaris/discussions).

## Compiling and running Polaris

1. [Install Rust](https://www.rust-lang.org/en-US/install.html) (stable toolchain)
2. Clone the polaris depot with this command: `git clone https://github.com/agersant/polaris.git`
3. You can now run compile and run polaris from the newly created directory with the command: `cargo run`

Polaris supports a few command line arguments which are useful during development:

- `-c some/config.toml` sets the location of the configuration file. This is useful to preconfigure users and music directories.
- `-c some/config.toml` sets the location of the [configuration](/docs/CONFIGURATION.md) file.
- `--data some/path` sets the folder Polaris will use to store runtime data such as playlists, collection index and auth secrets.
- `-w some/path/to/web/dir` lets you point to the directory to be served as the web interface. You can find a suitable directory in your Polaris install (under `/web`), or from the [latest polaris-web release](https://github.com/agersant/polaris-web/releases/latest/download/web.zip).
- `-f` (on Linux) makes Polaris not fork into a separate process.
Expand All @@ -19,6 +31,6 @@ Putting it all together, a typical command to compile and run the program would

While Polaris is running, access the web UI at [http://localhost:5050](http://localhost:5050).

## Running Unit Tests
## Running unit tests

That's the easy part, simply run `cargo test`!
4 changes: 2 additions & 2 deletions docs/DDNS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Streaming From Other Devices
# Streaming from other devices

These instructions apply to users running Polaris on a home network. When deploying to cloud services or VPS, configurations requirements will differ.

## Port Forwarding
## Port forwarding

Configure port forwarding on your router to redirect port 80 traffic towards port 5050 towards the computer running Polaris. The exact way to do this depends on your router manufacturer and model.

Expand Down
12 changes: 6 additions & 6 deletions docs/SETUP.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Installation

## Windows
## On Windows

1. Download the [latest installer](https://github.com/agersant/polaris/releases/latest) (you want the .msi file)
2. Run the installer
3. Launch Polaris from the start menu
4. In your web browser, access http://localhost:5050

## Linux
## In a docker container

To run polaris from a Docker container, please follow instructions from the [docker-polaris](https://github.com/ogarcia/docker-polaris) repository.

## From source on Linux

### Dependencies

Expand All @@ -24,7 +28,3 @@
From here, you might want to adjust your system to run Polaris on login using Systemd, Cron or whichever method your distribution endorses.

If you want to uninstall Polaris, execute `make uninstall-xdg` from the extracted archive's directory (or `make uninstall` if you made a system-wide install). This will delete all the files and directories listed above (including your configuration, playlists, etc.). If you customized the install process by specifying environment variables like `PREFIX`, make sure they are set to the same values when running the uninstall command.

## In a docker container

To run polaris from a Docker container, please follow instructions from the [docker-polaris](https://github.com/ogarcia/docker-polaris) repository.

0 comments on commit 77c3136

Please sign in to comment.