Browse Source

peertube: update for proxytanet

Guilhem Saurel 6 years ago
parent
commit
83e3196be7
2 changed files with 35 additions and 22 deletions
  1. 26 0
      peertube/README.md
  2. 9 22
      peertube/docker-compose.yml

+ 26 - 0
peertube/README.md

@@ -0,0 +1,26 @@
+# Peertube
+
+https://framagit.org/chocobozzz/PeerTube
+
+## Configure
+```
+export DB_PASSWORD=$(openssl rand -base64 32)
+echo POSTGRES_USER=postgres_user >> .env
+echo POSTGRES_PASSWORD=$DB_PASSWORD >> .env
+echo POSTGRES_DB=peertube >> .env
+echo PEERTUBE_WEBSERVER_PORT=80 >> .env
+echo PEERTUBE_WEBSERVER_HTTPS=false >> .env
+echo PEERTUBE_DB_HOSTNAME=db >> .env
+echo PEERTUBE_DB_USERNAME=postgres_user >> .env
+echo PEERTUBE_DB_PASSWORLD=$DB_PASSWORD >> .env
+echo PEERTUBE_REDIS_HOSTNAME=redis >> .env
+echo PEERTUBE_SMTP_PASSWORD=null >> .env
+echo PEERTUBE_SMTP_HOSTNAME=null >> .env
+echo PEERTUBE_SMTP_PORT=465 >> .env
+echo PEERTUBE_SMTP_TLS=true >> .env
+```
+
+## Deploy
+```
+docker-compose up -d
+```

+ 9 - 22
peertube/docker-compose.yml

@@ -1,47 +1,34 @@
 version: "3"
 
 networks:
-  traefik:
+  proxytanet:
     external: true
 
 services:
   app:
-    image: chocobozzz/peertube
+    image: chocobozzz/peertube:production-stretch
     restart: always
+    env_file:
+      - .env
     environment:
-      - PEERTUBE_WEBSERVER_HOSTNAME=peertube.wtf
-      - PEERTUBE_WEBSERVER_PORT=80
-      - PEERTUBE_WEBSERVER_HTTPS=false
-      - PEERTUBE_ADMIN_EMAIL=peertube@${CHATONS_DOMAIN:-local}
-      - PEERTUBE_DB_HOSTNAME=postgres
-      - PEERTUBE_DB_USERNAME=peertube
-      - PEERTUBE_SIGNUP_ENABLED=true
-      - PEERTUBE_TRANSCODING_ENABLED=true
-      - PEERTUBE_REDIS_HOSTNAME=redis
-      - PEERTUBE_SMTP_USERNAME=null
-      - PEERTUBE_SMTP_PASSWORD=null
-      - PEERTUBE_SMTP_HOSTNAME=null
-      - PEERTUBE_SMTP_PORT=25
-      - PEERTUBE_SMTP_FROM=noreply@peertube.${CHATONS_DOMAIN:-local}
-      - PEERTUBE_SMTP_TLS=true
+      - PEERTUBE_WEBSERVER_HOSTNAME=peertube.${CHATONS_DOMAIN:-local}
+      - PEERTUBE_SMTP_USERNAME=peertube@${CHATONS_DOMAIN:-local}
+      - PEERTUBE_SMTP_FROM=peertube@${CHATONS_DOMAIN:-local}
     labels:
       traefik.enable: "true"
       traefik.backend: "peertube"
       traefik.frontend.rule: "Host: peertube.${CHATONS_DOMAIN:-local}, www.peertube.${CHATONS_DOMAIN:-local}"
       traefik.docker.network: "traefik"
     networks:
-      - traefik
+      - proxytanet
       - default
     volumes:
       - ${CHATONS_ROOT_DIR:-/srv/chatons}/peertube/data:/data
       - ${CHATONS_ROOT_DIR:-/srv/chatons}/peertube/config:/config
 
-  postgres:
+  db:
     image: postgres:10-alpine
     restart: always
-    environment:
-      - POSTGRES_USER=peertube
-      - POSTGRES_DB=peertube
     env_file:
       - .env
     volumes: