Git Product home page Git Product logo

psq_streaming_server_docker's Introduction

Docker for PSQ Streaming Server

install docker

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge"
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
su ${USER}

build

local

docker build -t psq-streaming-server \
--build-arg PSQ_API_HOST=psqapi.neostore.net \
--add-host 127.0.0.1:192.168.0.1  . 

prod

docker build -t psq-streaming-server \
--build-arg APP_ENV=production \
--build-arg SERVER_NAME=psqstream.neostore.net \
--build-arg PSQ_API_HOST=psqapi.neostore.net \
--add-host 127.0.0.1:192.168.0.1  . 

create ssl certs

docker run -it --rm \
-v letsencrypt-etc:/etc/letsencrypt \
-v letsencrypt-lib:/var/lib/letsencrypt \
-v /home/smarcet/webroot:/data/letsencrypt \
-v letsencrypt-log:/var/log/letsencrypt \
certbot/certbot \
certonly --webroot \
--register-unsafely-without-email --agree-tos \
--webroot-path=/data/letsencrypt \
--staging \
-d psqstream.neostore.net
docker run -it --rm \
-v letsencrypt-etc:/etc/letsencrypt \
-v letsencrypt-lib:/var/lib/letsencrypt \
-v /home/smarcet/webroot:/data/letsencrypt \
-v letsencrypt-log:/var/log/letsencrypt \
certbot/certbot \
certonly --webroot \
--email [email protected] --agree-tos --no-eff-email \
--webroot-path=/data/letsencrypt \
-d psqstream.neostore.net
docker build -t psq-streaming-server \
--build-arg APP_ENV=production \
--build-arg PSQ_API_HOST=psqapi.neostore.net \
--build-arg SERVER_NAME=psqstream.neostore.net .	
  • run container
docker network create -d bridge --subnet 192.168.0.0/24 --gateway 192.168.0.1 docker-bridge

docker run --name psq-streaming-server1 \
-p 80:80 -p 443:443 -p 1935:1935 \
-v letsencrypt-etc:/etc/letsencrypt \
-v /home/smarcet/webroot:/data/letsencrypt \
--net=docker-bridge \
-m 8GB --oom-kill-disable \
--restart=always \
-d psq-streaming-server

Connect

docker exec -it psq-streaming-server1 /bin/bash
service --status-all

psq_streaming_server_docker's People

Contributors

smarcet avatar

Watchers

 avatar

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.