mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 07:58:28 +01:00
105 lines
3.4 KiB
YAML
105 lines
3.4 KiB
YAML
# To run this entire stack (contains all services):
|
|
|
|
# 1. Verify you have docker and docker-compose
|
|
# 2. Make sure this repository is cloned recursively (check if the `pokevidious` folder has stuff in it)
|
|
# 3. Optionally replace `build` with `image` in some services to save time on building
|
|
# 4. Proceed either to Section A or Section B
|
|
|
|
# Section A : Local development
|
|
# 1. Add this to your hosts file /etc/hosts (Linux) or C:\Windows\System32\drivers\etc\hosts (Windows)
|
|
#
|
|
# 127.0.0.1 poketube.test image-proxy.poketube.test eu-proxy.poketube.test p.poketube.test
|
|
#
|
|
# 2. Run `docker-compose up -d` or `docker compose up -d` (notice the dash)
|
|
# 3. Visit `http://poketube.test` in your browser
|
|
|
|
# Section B : Production
|
|
# 3. Adjust domains in `docker/Caddyfile` and `docker/config.json`
|
|
# 3.1 DO NOT touch tubeApi, invapi, invchannel, videourl in `docker/config.json` unless you know what you are doing
|
|
# 3.2 As for the others, make sure they're all https in both files
|
|
# 4. Run `docker-compose up -d` or `docker compose up -d` (notice the dash)
|
|
# 5. Visit your domain in your browser
|
|
|
|
services:
|
|
poketube: # port 6003
|
|
# image: quay.io/sudovanilla/poketube
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
depends_on:
|
|
- invidious
|
|
- lighttube
|
|
- january
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/poke.json:/poketube/config.json:ro
|
|
|
|
# lighttube - tubeApi
|
|
lighttube: # port 80
|
|
image: docker.io/kuylar/lighttube:20220711
|
|
depends_on:
|
|
- mongo
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/lighttube.yaml:/etc/lighttube.yml:ro
|
|
mongo: # port 27017
|
|
image: docker.io/mongo:latest
|
|
env_file: ./docker/mongo.env
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/data/mongo:/data/db
|
|
|
|
# invidious - invapi, invchannel and videourl
|
|
invidious: # port 3000
|
|
image: quay.io/invidious/invidious:latest
|
|
# build:
|
|
# context: pokevidious
|
|
# dockerfile: docker/Dockerfile
|
|
depends_on:
|
|
- postgres
|
|
restart: unless-stopped
|
|
deploy:
|
|
replicas: 2 # Adjust number depending on server load
|
|
volumes:
|
|
- ./docker/invidious.yaml:/invidious/config/config.yml:ro
|
|
postgres: # port 5432
|
|
image: docker.io/library/postgres:14
|
|
env_file: ./docker/postgres.env
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/data/postgres:/var/lib/postgresql/data
|
|
- ./pokevidious/config/sql:/config/sql:ro
|
|
- ./pokevidious/docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh:ro
|
|
|
|
# january - media_proxy
|
|
january: # port 7000
|
|
# image: ghcr.io/revoltchat/january:latest
|
|
build:
|
|
context: january
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
|
|
# p / pproxy - some kind of proxy idk
|
|
pproxy: # port 6014
|
|
build:
|
|
context: p
|
|
dockerfile: Dockerfile
|
|
volumes:
|
|
- ./docker/pproxy.json:/pproxy/whitelist.json:ro
|
|
restart: unless-stopped
|
|
|
|
# caddy - reverse proxy to connect everything together
|
|
caddy: # exposed ports 80, 443 / 8090
|
|
image: docker.io/caddy:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- ./docker/data/caddy:/data
|
|
ports:
|
|
# Notice this is the only service with ports exposed
|
|
- 80:80
|
|
- 443:443
|
|
# If you are running another proxy on the host and the ports are taken
|
|
# ... use this instead, and proxy the relevant domains to 127.0.0.1:8090
|
|
# Be aware that browsers will refuse
|
|
# - 127.0.0.1:8090:80
|