git clone https://github.com/ABeltramo/cloudtube-docker.git
cd cloudtube-docker/examples
docker-compose up
If any of this information gets outdated please see the instructions on how to run Cloudtube on the official documentation.
In order to start containers you'll need to properly setup config files for both Cloudtube (config.js) and Newleaf (configuration.py), for the following examples you can use the locally copied (and configured) cloudtube.config.js and newleaf-configuration.py
version: "3.4"
services:
cloudtube:
image: abeltramo/cloudtube:latest
ports:
- 3001:10412
depends_on:
- newleaf
container_name: cloudtube
restart: unless-stopped
volumes:
- ./db:/workdir/db
- ./cloudtube.config.js:/workdir/config/config.js #instance should be "http://newleaf:3000"
newleaf:
image: abeltramo/newleaf:latest
container_name: newleaf
restart: unless-stopped
volumes:
- ./newleaf-configuration.py:/workdir/configuration.py #set e.g. website_origin = "https://tube.domain.tld" and bind_port = 3000
Run: docker-compose up
, this command will trigger the following:
- Download latest cloudtube and newleaf docker images from Docker hub (if already present locally will be updated)
- Start
newleaf
first: this is because we specified that cloudtubedepends_on
newleaf. This container will also get the local newleaf-configuration.py mounted at/workdir/configuration.py
- Start
cloudtube
this container will:- Get the local cloudtube.config.js at
/workdir/config/config.js
. - Get the local
db
folder (will be created if not present) so that the sqlite db will be persisted outside of the container. - Expose the web ui from the default port
10412
to the local3001
port
- Get the local cloudtube.config.js at
Setup is over you can open your web browser at http://localhost:3001 to start using cloudtube
You can see a more sophisticated docker-compose-traefik.yml example that involves using Traefik as a proxy thanks to @erikderzweite