Giter VIP home page Giter VIP logo

cytube-docker's Introduction

cytube-docker

Docker compose for sync by calzoneman

https://github.com/calzoneman/sync

Disclaimer

This image is not officially supported by the main CyTube developers. It is maintained by third party contributors. Feel free to submit pull requests if you'd like to fix or improve the image.

The image cytube/cytube:latest is automatically built from the master branch at GitHub. That branch is intended to stay stable, and will not be updated until the changes have been tested in another branch/image. We suggest using the latest tag in production. The develop image (cytube/cytube:develop) is automatically built from the develop branch at GitHub. We advise against using the develop tag in production.

How to get started

To run this application first you must clone the repo using git clone --recursive https://github.com/CyTube/cytube-docker.git

Next you will need to run copy_config.sh in order to automatically copy the latest versions of the config from the sync folder. You may also choose to do this manually. You will need the conf/example and a config.yaml files so that they can be mounted into the container. The script is there to make this easier for you by downloading the necessary files.

After you have the files, open the config.yaml file and edit the information in the config to meet your specific needs. calzoneman has thoroughly commented the file to give you a good idea of what needs to be edited.

After editing your config.yaml file you will need to edit the docker-compose.yml to match what you have entered in the config.yaml file. It is commented to give you an idea of what needs to be edited.

When you have finished the previous steps start the containers by running docker-compose up -d this will cause docker-compose to build the Dockerfile and start the sync and mariadb/mysql containers.

Nginx Reverse Proxy Config

Here is an example config for using Nginx to reverse proxy sync using https on port 8443.

server {

    listen 443 ssl http2;
    server_name sync.example.com;
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;


        location / {
                proxy_pass https://sync:8443;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host $http_host;
                   }
}

If you already have a reverse proxy in place such as Nginx you must add the network to the sync container in the docker-compose.yml file.

Example docker-compose.yml configuration with a Reverse Proxy:

version: "3.7"
services:
   sync:
     build: .
     depends_on:
       - "mysql"
     ports:
       - "8980:8080"
       - "1337:1337"
       - "8443:8443"
     volumes:
       - "./certs:/etc/certs"
       - "./config.yaml:/home/syncuser/sync/config.yaml"
     networks:
        - sync_internal
# This is an example of the network where the nginx is located
        - my_reverse_proxy_network
   mysql:
     image: mariadb:10.5.1
     environment:
       - MYSQL_ROOT_PASSWORD=sync 
       - MYSQL_DATABASE=cytube3 
       - MYSQL_USER=cytube3
       - MYSQL_PASSWORD=super_secure_password
     volumes:
       - "./mysql:/var/lib/mysql"      
     networks:
       - sync_internal
networks:
  sync_internal:
# You must also add the network here and clarify that the network is external from this docker-compose.yml file
  my_reverse_proxy_network:
    external: true

cytube-docker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cytube-docker's Issues

Stable Commit

@calzoneman What commit would you like the stable/latest image at Docker Hub to use?

Do you host a page where users can see what the latest "stable" commit is, other than the releases page?

Maria Db unable to connect

@calzoneman With current docker-compose file, mysql fails to connect.

watch    | [ERROR] database: Initial database connection failed: Error: connect ECONNREFUSED 127.0.0.1:3306
watch    |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
watch    |     --------------------
watch    |     at Protocol._enqueue (/home/syncuser/sync/node_modules/mysql/lib/protocol/Protocol.js:144:48)
watch    |     at Protocol.handshake (/home/syncuser/sync/node_modules/mysql/lib/protocol/Protocol.js:51:23)
watch    |     at Connection.connect (/home/syncuser/sync/node_modules/mysql/lib/Connection.js:116:18)
watch    |     at /home/syncuser/sync/node_modules/knex/lib/dialects/mysql/index.js:68:18
watch    |     at new Promise (<anonymous>)
watch    |     at Client_MySQL.acquireRawConnection (/home/syncuser/sync/node_modules/knex/lib/dialects/mysql/index.js:63:12)
watch    |     at create (/home/syncuser/sync/node_modules/knex/lib/client.js:289:39)
watch    |     at processTicksAndRejections (internal/process/task_queues.js:97:5)  

When removing following it starts working.

# This will create and mount the mysql files in the same folder as the docker-compose.yml file.
# You can change this to be anywhere.
# This will provide data persistence to your MariaDB database.
       - "./mysql:/var/lib/mysql"   

Any ideas how it can be fixed with persistent volume.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.