Client
Deploying the client#
Method 1 - Vercel - Recommended#
Click here to fork the P-Stream Github repository
Click here to go to Vercel
Sign in using either a GitHub, GitLab, or Bitbucket.
Clicking the "New Project" button on the top right of your dashboard and following the steps to create a new project for your self hosted version of movie web.
After clicking it, you'll be presented with a list of Git repositories that the Git account you've signed up with has write access to.
Select your own fork of the P-Stream Github repository.
Configure the environment variables:
VITE_CORS_PROXY_URL = PUT_A_PROXY_URL_HERE (Example https://test-proxy.test.workers.dev)
VITE_TMDB_READ_API_KEY = eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1NzlkZWYyZDY5ZWFlNDk4ZjJiOTI4MTgyNDdjM2ViMCIsInN1YiI6IjY2MjdmMGJlNjJmMzM1MDE0YmQ4NTFmMiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.h3KpPvkiaz8uNz1bntAKqsPrxG_4UUWaY3kYME6N6m8
VITE_BACKEND_URL = PUT_A_BACKEND_URL_HERE (only needed for self host)(Example https://test-backend.test.workers.dev)
Click "Deploy"
Congrats! You have your own version of P-Stream hosted.
You may wish to configure a custom domain - Please consult the Vercel docs for how to do this.
Method 2 - Cloudflare Pages (Best host)#
Fork P-Stream on Github.
Go to Cloudflare pages and click "Sign Up".
Create a Cloudflare account.
If you already have a Cloudflare account you will be redirected to the workers and pages dashboard.
Now, click the blue "Create" button at the top of the page.
By default Cloudflare assumes your creating a worker instead, change the "Workers" tab to "Pages".
Select the blue button that says "Connect to git" and then connect the Github account you forked P-Stream on.
Now you can select repositories from your github account, select your fork of P-Stream and click "Begin setup".
Give your project a silly name and select production
as the production branch.
beta
branch.In "Build settings" change the "Build command" to pnpm build
and the "Build output directory" to dist
.
Select the Environment variable
drop down and add the below variables.
VITE_CORS_PROXY_URL = PUT_A_PROXY_URL_HERE (Example https://test-proxy.test.workers.dev)
VITE_TMDB_READ_API_KEY = eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1NzlkZWYyZDY5ZWFlNDk4ZjJiOTI4MTgyNDdjM2ViMCIsInN1YiI6IjY2MjdmMGJlNjJmMzM1MDE0YmQ4NTFmMiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.h3KpPvkiaz8uNz1bntAKqsPrxG_4UUWaY3kYME6N6m8
VITE_BACKEND_URL = PUT_A_BACKEND_URL_HERE (only needed for self host)(Example https://test-backend.test.workers.dev)
Click "Save and Deploy" to watch your new site deploy.
Congrats! You have your own version of P-Stream hosted for FREE.
Method 3 - Static Web Host#
Download the file pstream.zip
from the latest release: https://github.com/Pasithea0/smov/releases/latest.
Extract the ZIP file so you can edit the files.
Open config.js
in an editor such as Notepad, Visual Studio Code or similar.
Configure your enviroment variables
VITE_CORS_PROXY_URL = PUT_A_PROXY_URL_HERE (Example https://test-proxy.test.workers.dev)
VITE_TMDB_READ_API_KEY = eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1NzlkZWYyZDY5ZWFlNDk4ZjJiOTI4MTgyNDdjM2ViMCIsInN1YiI6IjY2MjdmMGJlNjJmMzM1MDE0YmQ4NTFmMiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.h3KpPvkiaz8uNz1bntAKqsPrxG_4UUWaY3kYME6N6m8
VITE_BACKEND_URL = PUT_A_BACKEND_URL_HERE (only needed for self host)(Example https://test-backend.test.workers.dev)
Save the file.
Upload all of the files to a static website hosting such as:
- GitHub Pages
- Netlify
- Vercel
- Etc, there are lots of options.
Congrats! You have your own version of P-Stream hosted.
Method 4 - Docker Compose - Home Network#
This method is meant for those using a desktop device or single board computer with a minimum of 4GB of RAM such as a Raspberry Pi to run P-Stream on there home network for network connected devices.
- Ensure you have docker installed. In a newly created directory called
P-Stream
create a file calleddocker-compose.yaml
. Paste the contents of the code block below into this file.
version: "3.8"
services:
movieweb:
build:
context: https://github.com/Pasithea0/smov.git#main
# args:
# TMDB_READ_API_KEY: ""
# CORS_PROXY_URL: ""
# BACKEND_URL: ""
ports:
- "80:80"
restart: unless-stopped
Within the docker-compose.yaml
file uncomment args
, TMDB_READ_API_KEY
, CORS_PROXY_URL
. Only uncomment BACKEND_URL
if you are hosting the backend.
- Make sure
args
is in-line withcontext
- Make sure
TMDB_READ_API_KEY
andCORS_PROXY_URL
are tabbed once to the right ofargs
.
Configure your enviroment variables
CORS_PROXY_URL = PUT_A_PROXY_URL_HERE (Example https://test-proxy.test.workers.dev)
TMDB_READ_API_KEY = eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1NzlkZWYyZDY5ZWFlNDk4ZjJiOTI4MTgyNDdjM2ViMCIsInN1YiI6IjY2MjdmMGJlNjJmMzM1MDE0YmQ4NTFmMiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.h3KpPvkiaz8uNz1bntAKqsPrxG_4UUWaY3kYME6N6m8
BACKEND_URL = PUT_A_BACKEND_URL_HERE (only needed for self host)(Example https://test-backend.test.workers.dev)
Uncomment and add any additional environment variables you may need. Remove the VITE_
prefix when adding an environment variable to args
.
Save the file!
Now use docker to run movieweb
as background service.
# P-Stream is the current working directory
$ docker compose up --detach
Verify that setup was successful
- Navigate to
http://localhost
. You should see the UI forP-Stream
. Find something to watch and make sure that it plays. - View logs with
$ docker compose logs --follow movieweb
Navigate to movie web at http://<static-ip-address
from another device connected to your network.
To Perform Updates For New Releases of Movie Web#
Make sure P-Stream
is your current working directory and run:
# Re-build the image and start the container
$ docker compose up --build --detach