Skip to content

Commit c2215ee

Browse files
committed
feat: adds docker comands, docker compose and updated installtion in readme
1 parent 9cbc648 commit c2215ee

4 files changed

Lines changed: 159 additions & 9 deletions

File tree

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,65 @@ To run this project you will need to add the following environment variables to
8181
`MOUNT_METHOD` The mounting method you want to use. Must be either `strm` or `fuse`. Read here for choosing a method. The default is `strm` and is optional.
8282

8383
`MOUNT_PATH` The mounting path where all of your files will be accessible. If inside of Docker, this path needs to be accessible to other applications. If running locally without Docker, this path must be owned.
84+
85+
## Running on Docker (recommended)
86+
1. Make sure you have Docker installed on your server/computer. You can find instructions on how to install Docker [here](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04) *(you can change your distribution in the guide)*.
87+
2. Edit the below Docker command with your proper environment variables and options. More Docker run commands can be found [here](https://github.com/TorBox-App/torbox-media-center/docker.md).
88+
```bash
89+
docker run -it -d \
90+
--name=torbox-media-center \
91+
--restart=always \
92+
--init \
93+
-v /home/$(whoami)/torbox:/torbox \
94+
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
95+
-e MOUNT_METHOD=strm \
96+
-e MOUNT_PATH=/torbox \
97+
anonymoussystems/torbox-media-center:main
98+
```
99+
or if you prefer Docker compose, this is the yaml, also found [here](https://github.com/TorBox-App/torbox-media-center/docker-compose.yaml).
100+
```yaml
101+
name: torbox-media-center
102+
services:
103+
torbox-media-center:
104+
container_name: torbox-media-center
105+
stdin_open: true
106+
tty: true
107+
restart: always
108+
volumes:
109+
- /home/$(whoami)/torbox:/torbox
110+
environment:
111+
- TORBOX_API_KEY=<EDIT_THIS_KEY>
112+
- MOUNT_METHOD=strm
113+
- MOUNT_PATH=/torbox
114+
image: anonymoussystems/torbox-media-center:main
115+
```
116+
*You may also use the Github repository container found here: ghcr.io/torbox-app/torbox-media-center:main*
117+
3. Wait for the files to be mounted to your local system.
118+
119+
## Running Locally (no Docker)
120+
1. Make sure you have Python installed. Anything from v3.6 should be okay.
121+
2. Download or git clone this repository.
122+
```bash
123+
git clone https://github.com/TorBox-App/torbox-media-center.git
124+
```
125+
or download the repository zip file [here](https://github.com/TorBox-App/torbox-media-center/archive/refs/heads/main.zip) and extract the files.
126+
127+
3. Create a `.env` file or rename `.env.example` to `.env`.
128+
4. Edit or add in your environment variables to the `.env` file.
129+
5. Install the requirements.
130+
```bash
131+
pip3 install -r requirements.txt
132+
```
133+
6. Run the `main.py` script.
134+
```bash
135+
python3 main.py
136+
```
137+
7. Wait for the files to be mounted to your local machine.
138+
139+
## Support
140+
For support, email [contact@torbox.app](mailto:contact@torbox.app) or join our Discord server [here](https://join-discord.torbox.app). *We will not give sources or help with piracy in any way. This is for technical support only.*
141+
142+
## Contributing
143+
Contributions are always welcome!
144+
145+
Please make sure to follow [Conventional Commits](https://conventionalcommits.org/) when creating commit messages. We will authorize most pull requests, so don't hesitate to help out!

docker-compose.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: torbox-media-center
2+
services:
3+
torbox-media-center:
4+
container_name: torbox-media-center
5+
stdin_open: true
6+
tty: true
7+
restart: always
8+
volumes:
9+
- /home/$(whoami)/torbox:/torbox
10+
environment:
11+
- TORBOX_API_KEY=<EDIT_THIS_KEY>
12+
- MOUNT_METHOD=strm
13+
- MOUNT_PATH=/torbox
14+
image: anonymoussystems/torbox-media-center:main

docker.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## Standard Docker Run Command (STRM)
2+
3+
Below is a standard Docker run command if spawning from the command line. Keep in mind the volume mount paths. If you change these in the environment variable, make sure you change it in the volume mount path.
4+
5+
```bash
6+
docker run -it -d \
7+
--name=torbox-media-center \
8+
--restart=always \
9+
--init \
10+
-v /home/$(whoami)/torbox:/torbox \
11+
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
12+
-e MOUNT_METHOD=strm \
13+
-e MOUNT_PATH=/torbox \
14+
anonymoussystems/torbox-media-center:main
15+
```
16+
17+
## Standard Docker Run Command (FUSE)
18+
19+
Below is a standard Docker run command for using FUSE. Notice the difference when attaching the `/dev/fuse` device. We also needed to add the `--cap-add SYS_ADMIN` parameter. The Docker container needs access to the FUSE device of the system to activate the virtual file system.
20+
21+
> [!CAUTION]
22+
> The `--cap-add SYS_ADMIN` parameter gives the container certain permissions which it would otherwise have. This is required to access the host systems FUSE device, but keep this in mind. You can read more about this [here](https://docs.docker.com/reference/cli/docker/container/run/#privileged).
23+
24+
```bash
25+
docker run -it -d \
26+
--name=torbox-media-center \
27+
--restart=always \
28+
--init \
29+
--cap-add SYS_ADMIN \
30+
--device /dev/fuse \
31+
-v /mnt/torbox:/torbox:rshared \
32+
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
33+
-e MOUNT_METHOD=fuse \
34+
-e MOUNT_PATH=/torbox \
35+
anonymoussystems/torbox-media-center:main
36+
```
37+
38+
39+
## Standard Docker Run Command Using GitHub Repository (STRM)
40+
41+
This config below is exactly the same as the above, except it is pulling from the GitHub repository rather than Docker Hub. Some people, find that GitHub is much faster than Docker, and sometimes Docker is down.
42+
```bash
43+
docker run -it -d \
44+
--name=torbox-media-center \
45+
--restart=always \
46+
--init \
47+
-v /home/$(whoami)/torbox:/torbox \
48+
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
49+
-e MOUNT_METHOD=strm \
50+
-e MOUNT_PATH=/torbox \
51+
ghcr.io/torbox-app/torbox-media-center:main
52+
```
53+
## Docker Run Command Changing Location Of Files On Local System (STRM)
54+
55+
This config below changes where on the local system the files are mounted. Instead of in the home directory, it is now mounted in the `/mnt/torbox` directory, which is where you would be able to find your mounted files.
56+
57+
```bash
58+
docker run -it -d \
59+
--name=torbox-media-center \
60+
--restart=always \
61+
--init \
62+
-v /mnt/torbox:/torbox \
63+
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
64+
-e MOUNT_METHOD=strm \
65+
-e MOUNT_PATH=/torbox \
66+
anonymoussystems/torbox-media-center:main
67+
```
68+
69+
## Docker Run Command Changing Location Of Files In Container (STRM)
70+
71+
This config below changes where on the Docker side where the files are stored. This isn't exactly necessary, but some people may want to change it, so here is a sample where the local system sees the mounted files at `/mnt/torbox` but inside the container, the files are now located at `/data`. Keep in mind that the `MOUNT_PATH` changed to reflect this.
72+
73+
```bash
74+
docker run -it -d \
75+
--name=torbox-media-center \
76+
--restart=always \
77+
--init \
78+
-v /mnt/torbox:/data \
79+
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
80+
-e MOUNT_METHOD=strm \
81+
-e MOUNT_PATH=/data \
82+
anonymoussystems/torbox-media-center:main
83+
```

docker.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)