Compare commits

...

11 Commits

Author SHA1 Message Date
William Oldham
fb6531640d Merge pull request #59 from sussy-code/master
Add "Keeping your instance synced" section to "Upgrade Guide" page
2024-03-30 11:51:28 +00:00
William Oldham
59ee00a876 Update content/3.client/5.upgrade.md 2024-03-30 11:50:29 +00:00
William Oldham
ca6195fd1d Merge branch 'master' into master 2024-03-30 09:02:44 +00:00
Pokey
19c065f4f0 Add a full self deployment docker file (#58)
* Created 2.selfhost.md

Added a docker compose file that hosted all of movie-web

* Update 2.selfhost.md - changed to example.tld rather than what it was before

Changed the domain to example.tld

* type errors/5.extra/2.selfhost.md

Co-authored-by: William Oldham <github@binaryoverload.co.uk>

* Update content/5.extra/2.selfhost.md

added -backend to movie-web

Co-authored-by: William Oldham <github@binaryoverload.co.uk>

* removed unneeded port exposure.selfhost.md

* Update content/5.extra/2.selfhost.md

* Update content/5.extra/2.selfhost.md

* Update content/5.extra/2.selfhost.md

---------

Co-authored-by: William Oldham <github@binaryoverload.co.uk>
2024-03-30 09:02:11 +00:00
Cooper Ransom
f51f91c88a Fix the action and give my boi Toon credit 2024-03-25 21:55:43 -04:00
Cooper Ransom
f18a2d3cbb Try to fix most of binarys issues 2024-03-25 21:03:45 -04:00
Captain Jack Sparrow
daf63550be Grammar police #2
Co-authored-by: Jorrin <43169049+JorrinKievit@users.noreply.github.com>
2024-03-22 20:46:09 -04:00
Captain Jack Sparrow
db6048efa5 Grammar police #1
Co-authored-by: Jorrin <43169049+JorrinKievit@users.noreply.github.com>
2024-03-22 20:45:58 -04:00
Cooper Ransom
352faef7c4 Implement Toon's yaml file 2024-03-22 20:45:11 -04:00
Cooper Ransom
eb067a5b90 Remove package-lock 2024-03-22 12:17:56 -04:00
Cooper Ransom
a4de3ddb31 Implement in upgrade guide 2024-03-22 12:16:19 -04:00
2 changed files with 156 additions and 2 deletions

View File

@@ -1,8 +1,63 @@
---
title: 'Upgrade guide'
title: 'Update guide'
---
# Upgrade guide
# Keeping your instance synced
Keeping your instance up-to-date with the latest features and bug fixes can enhance your instance's functionality and ensure it stays current. When updates are released, you have the option to adopt them using either one of the guides. Below is a automatic and an manual guide on updating your instance.
## Automatic update
You can also setup a scheduled workflow to automatically update your instance. This will allow you to keep your instance up to date without manual intervention.
To do this, you will need to follow the guide below...
1. If you have not already, click [here](https://github.com/movie-web/movie-web/fork) to fork the movie-web Github repository.
2. Create a [personal access token](https://docs.catalyst.zoho.com/en/tutorials/githubbot/java/generate-personal-access-token) and add to [repository's secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) as `PAT`
3. Paste the below file into your repository's root `/.github/workflows` directory
```yaml
# File: .github/workflows/sync.yml
name: Sync fork
on:
schedule:
- cron: "0 * * * *" # Run the job every hour
push:
branches:
- "*"
paths:
- .github/workflows/sync.yml
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: gh repo sync <OWNER>/<FORK> # Replace the placeholders within the < >
env:
GH_TOKEN: ${{ github.token }}
- uses: gautamkrishnar/keepalive-workflow@v1
```
4. Replace the `<OWNER>` placeholder with the GitHub username of the account that owns the fork.
5. Replace the `<FORK>` placeholder with the repository name of your fork.
6. Commit and push the changes to your repository.
Your instance should now be automatically updated to the latest version.
## Manual update
You can manually update by executing the following commands in the root directory of the repository you have created, you would have to do this every time a push occurs to stay up-to-date:
```bash
git remote add movie-web https://github.com/movie-web/movie-web.git
git fetch movie-web
# Change `dev` to `master` if you want a stable experience
git merge movie-web/dev --allow-unrelated-histories
git push -f # Force push to your origin main branch
```
# Upgrade version
## From `3.X` to `4.X`

View File

@@ -0,0 +1,99 @@
### Guide to full Self-Deployment of movie-web with Docker Compose
1. **Install Docker and Docker Compose:**
Ensure that Docker and Docker Compose are installed on your system. You can follow the official Docker documentation for installation instructions:
- [Install Docker](https://docs.docker.com/get-docker/)
2. **Create a Docker Compose file:**
Create a new file named `docker-compose.yml` in your project directory and paste the following content into it:
```yaml
version: '3.8'
services:
postgres:
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere
networks:
- movie-web-network
movie-web-backend:
image: ghcr.io/movie-web/backend:latest
restart: unless-stopped
environment:
MWB_SERVER__CORS: "https://movie-backend.example.tld https://movie.example.tld"
MWB_SERVER__PORT: 8080
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_CRYPTO__SESSION_SECRET: 32CHARACTERLONGSECRET
MWB_META__NAME: Server name
MWB_META__DESCRIPTION: Server Description
MWB_POSTGRES__MIGRATE_ON_BOOT: "true"
MWB_SERVER__TRUSTPROXY: "true"
MWB_SERVER__TRUSTCLOUDFLARE: "true"
# This is needed to resolve errors running migrations on some platforms - does not affect the application
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "false"
ports:
- "8080:8080"
depends_on:
- postgres
networks:
- movie-web-network
movie-web-frontend:
build:
context: https://github.com/movie-web/movie-web.git
args:
TMDB_READ_API_KEY: "YourTMDBReadAPIKeyHere"
CORS_PROXY_URL: "https://cors.example.tld https://second.cors.example.tld"
BACKEND_URL: "https://backend.example.tld"
DMCA_EMAIL: "YourEmail"
PWA_ENABLED: "true"
APP_DOMAIN: "YourDomainHere"
OPENSEARCH_ENABLED: "true"
GA_ID: "Google ID Here"
ports:
- "80:80"
networks:
- movie-web-network
restart: unless-stopped
movie-web-proxy:
image: ghcr.io/movie-web/simple-proxy:latest
ports:
- "3000:3000"
networks:
- movie-web-network
restart: unless-stopped
networks:
movie-web-network:
driver: bridge
**Important:**
* Replace `YourPasswordHere` with your secure database password.
* Generate a strong session secret and replace `32CharacterLongStringHere`.
```
**Important:**
* Replace `YourPasswordHere` with your secure database password.
* Generate a strong session secret and replace `32CharacterLongStringHere`.
* Replace `TMDBReadAPIKey` with your api key learn more [here](https://movie-web.github.io/docs/client/tmdb).
* replace `yourDomainHere` with whatever you'll be using to access your main site, like movie-web.app
* replace `meta__name` and `meta__description`
2. **Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute:
```bash
docker compose up --detach
```
**Accessing Your Backend**
Your services should be accessible on `(YourPrivateIP):port`. To share it outside your local network, you'll need to configure port forwarding or cloudflared tunnel.
**Optional: Implementing a Reverse Proxy**
To enhance your SSL and domain configuration, it's advisable to establish a reverse proxy, such as Nginx. For an optimal choice in this regard, Cloudflare Zero Trust Tunnel is recommended. You can find more information [here](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).