From 302e7b19da6c80022cee7b1466f88ee94b4fec67 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sun, 7 Oct 2018 15:04:38 +0200 Subject: (docker) search and import settings env variables (#1210) --- .../config/custom-environment-variables.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'support/docker') diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml index daf885813..1f7fbf849 100644 --- a/support/docker/production/config/custom-environment-variables.yaml +++ b/support/docker/production/config/custom-environment-variables.yaml @@ -56,6 +56,26 @@ signup: __name: "PEERTUBE_SIGNUP_LIMIT" __format: "json" +search: + remote_uri: + users: + __name: "PEERTUBE_SEARCH_REMOTEURI_USERS" + __format: "json" + anonymous: + __name: "PEERTUBE_SEARCH_REMOTEURI_ANONYMOUS" + __format: "json" + +import: + videos: + http: + enabled: + __name: "PEERTUBE_IMPORT_VIDEOS_HTTP" + __format: "json" + torrent: + enabled: + __name: "PEERTUBE_IMPORT_VIDEOS_TORRENT" + __format: "json" + transcoding: enabled: __name: "PEERTUBE_TRANSCODING_ENABLED" -- cgit v1.2.3 From ee7c25c767c357bd12570889f8ccd79ba9ea4eb9 Mon Sep 17 00:00:00 2001 From: am97 Date: Tue, 9 Oct 2018 17:35:02 +0200 Subject: Create new Docker dev image (#1173) * Move the old dev docker files to support/docker/janitor * Create new Docker dev image --- support/docker/dev/Dockerfile | 48 ++++++++++++++++++++++----------- support/docker/dev/create_user.sql | 3 --- support/docker/dev/janitor.json | 42 ----------------------------- support/docker/dev/setup_postgres.sql | 6 +++++ support/docker/dev/supervisord.conf | 3 --- support/docker/dev/usage.md | 20 ++++++++++++++ support/docker/janitor/Dockerfile | 32 ++++++++++++++++++++++ support/docker/janitor/create_user.sql | 3 +++ support/docker/janitor/janitor.json | 42 +++++++++++++++++++++++++++++ support/docker/janitor/supervisord.conf | 3 +++ 10 files changed, 138 insertions(+), 64 deletions(-) delete mode 100644 support/docker/dev/create_user.sql delete mode 100644 support/docker/dev/janitor.json create mode 100644 support/docker/dev/setup_postgres.sql delete mode 100644 support/docker/dev/supervisord.conf create mode 100644 support/docker/dev/usage.md create mode 100644 support/docker/janitor/Dockerfile create mode 100644 support/docker/janitor/create_user.sql create mode 100644 support/docker/janitor/janitor.json create mode 100644 support/docker/janitor/supervisord.conf (limited to 'support/docker') diff --git a/support/docker/dev/Dockerfile b/support/docker/dev/Dockerfile index 2b4f2b215..aa4a8a3d6 100644 --- a/support/docker/dev/Dockerfile +++ b/support/docker/dev/Dockerfile @@ -1,32 +1,48 @@ -FROM janitortechnology/ubuntu-dev +FROM ubuntu:bionic + +# Avoid tzdata interactive dialog +ENV DEBIAN_FRONTEND=noninteractive # Install PeerTube's dependencies. # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies -RUN sudo apt-get update -q && sudo apt-get install -qy \ +RUN apt-get update -q && apt-get install -qy \ + curl \ + nano \ ffmpeg \ postgresql \ - openssl + postgresql-contrib \ + openssl \ + g++ \ + make \ + redis-server \ + git \ + gnupg + +# Install NodeJS 8.x +RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ + apt-get install -y nodejs + +# Install Yarn +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ + apt-get update && apt-get install yarn # Download PeerTube's source code. RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube WORKDIR /home/user/PeerTube -# Configure the IDEs to use Janitor's source directory as workspace. -ENV WORKSPACE /home/user/PeerTube/ - # Install dependencies. RUN yarn install --pure-lockfile -# Configure Janitor for PeerTube. -COPY --chown=user:user janitor.json /home/user/ +# Configure and run PeerTube. +COPY setup_postgres.sql /tmp/ +RUN service postgresql start \ + && su postgres -c "psql --file=/tmp/setup_postgres.sql" -# Configure and build PeerTube. -COPY create_user.sql /tmp/ -RUN sudo service postgresql start \ - && sudo -u postgres psql --file=/tmp/create_user.sql \ - && npm run build - -COPY --chown=user:user supervisord.conf /tmp/supervisord-extra.conf -RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf +# Expose PeerTube sources as a volume +VOLUME /home/user/PeerTube EXPOSE 3000 9000 + +# Start PostgreSQL and Redis +CMD service postgresql start && redis-server diff --git a/support/docker/dev/create_user.sql b/support/docker/dev/create_user.sql deleted file mode 100644 index c2fbcf27e..000000000 --- a/support/docker/dev/create_user.sql +++ /dev/null @@ -1,3 +0,0 @@ -create database peertube_dev; -create user peertube password 'peertube'; -grant all privileges on database peertube_dev to peertube; diff --git a/support/docker/dev/janitor.json b/support/docker/dev/janitor.json deleted file mode 100644 index 5acdf3060..000000000 --- a/support/docker/dev/janitor.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "PeerTube", - "description": "Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.", - "icon": "https://janitor.technology/img/peertube.svg", - "docker": { - "image": "chocobozzz/peertube-dev" - }, - "ports": { - "22": { - "label": "SSH", - "proxy": "none" - }, - "3000": { - "label": "PeerTube web app", - "proxy": "https", - "preview": true - }, - "8088": { - "label": "VNC", - "proxy": "https" - }, - "8089": { - "label": "Cloud9", - "proxy": "https" - }, - "8090": { - "label": "Theia", - "proxy": "https" - }, - "9000": { - "label": "PeerTube API", - "proxy": "https" - } - }, - "scripts": { - "Start PeerTube": "npm run dev", - "Build PeerTube": "npm run build", - "Run tests": "npm test", - "Update source code": "git pull --rebase origin", - "Send to code review": "hub pull-request" - } -} diff --git a/support/docker/dev/setup_postgres.sql b/support/docker/dev/setup_postgres.sql new file mode 100644 index 000000000..0937f9d19 --- /dev/null +++ b/support/docker/dev/setup_postgres.sql @@ -0,0 +1,6 @@ +create database peertube_dev; +create user peertube password 'peertube'; +grant all privileges on database peertube_dev to peertube; +\c peertube_dev +CREATE EXTENSION pg_trgm; +CREATE EXTENSION unaccent; diff --git a/support/docker/dev/supervisord.conf b/support/docker/dev/supervisord.conf deleted file mode 100644 index b2e1682df..000000000 --- a/support/docker/dev/supervisord.conf +++ /dev/null @@ -1,3 +0,0 @@ -[program:postgresql] -user = user -command = sudo -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf diff --git a/support/docker/dev/usage.md b/support/docker/dev/usage.md new file mode 100644 index 000000000..319d7db30 --- /dev/null +++ b/support/docker/dev/usage.md @@ -0,0 +1,20 @@ +### Usage +1. Build the image: + ``` + docker build -t my_peertube_dev . + ``` +1. Start the container: + ``` + docker run -d -i -p 3000:3000 -p 9000:9000 --name peertube my_peertube_dev + ``` + This will create a new Docker volume containing PeerTube sources. + +1. Start PeerTube inside the container: + ``` + docker exec -it peertube npm run dev + ``` +1. In another window, find the path to the Docker volume + ``` + docker inspect peertube | less +/Mounts + ``` + You can now make changes to the files. They should be automatically recompiled. diff --git a/support/docker/janitor/Dockerfile b/support/docker/janitor/Dockerfile new file mode 100644 index 000000000..2b4f2b215 --- /dev/null +++ b/support/docker/janitor/Dockerfile @@ -0,0 +1,32 @@ +FROM janitortechnology/ubuntu-dev + +# Install PeerTube's dependencies. +# Packages are from https://github.com/Chocobozzz/PeerTube#dependencies +RUN sudo apt-get update -q && sudo apt-get install -qy \ + ffmpeg \ + postgresql \ + openssl + +# Download PeerTube's source code. +RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube +WORKDIR /home/user/PeerTube + +# Configure the IDEs to use Janitor's source directory as workspace. +ENV WORKSPACE /home/user/PeerTube/ + +# Install dependencies. +RUN yarn install --pure-lockfile + +# Configure Janitor for PeerTube. +COPY --chown=user:user janitor.json /home/user/ + +# Configure and build PeerTube. +COPY create_user.sql /tmp/ +RUN sudo service postgresql start \ + && sudo -u postgres psql --file=/tmp/create_user.sql \ + && npm run build + +COPY --chown=user:user supervisord.conf /tmp/supervisord-extra.conf +RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf + +EXPOSE 3000 9000 diff --git a/support/docker/janitor/create_user.sql b/support/docker/janitor/create_user.sql new file mode 100644 index 000000000..c2fbcf27e --- /dev/null +++ b/support/docker/janitor/create_user.sql @@ -0,0 +1,3 @@ +create database peertube_dev; +create user peertube password 'peertube'; +grant all privileges on database peertube_dev to peertube; diff --git a/support/docker/janitor/janitor.json b/support/docker/janitor/janitor.json new file mode 100644 index 000000000..5acdf3060 --- /dev/null +++ b/support/docker/janitor/janitor.json @@ -0,0 +1,42 @@ +{ + "name": "PeerTube", + "description": "Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.", + "icon": "https://janitor.technology/img/peertube.svg", + "docker": { + "image": "chocobozzz/peertube-dev" + }, + "ports": { + "22": { + "label": "SSH", + "proxy": "none" + }, + "3000": { + "label": "PeerTube web app", + "proxy": "https", + "preview": true + }, + "8088": { + "label": "VNC", + "proxy": "https" + }, + "8089": { + "label": "Cloud9", + "proxy": "https" + }, + "8090": { + "label": "Theia", + "proxy": "https" + }, + "9000": { + "label": "PeerTube API", + "proxy": "https" + } + }, + "scripts": { + "Start PeerTube": "npm run dev", + "Build PeerTube": "npm run build", + "Run tests": "npm test", + "Update source code": "git pull --rebase origin", + "Send to code review": "hub pull-request" + } +} diff --git a/support/docker/janitor/supervisord.conf b/support/docker/janitor/supervisord.conf new file mode 100644 index 000000000..b2e1682df --- /dev/null +++ b/support/docker/janitor/supervisord.conf @@ -0,0 +1,3 @@ +[program:postgresql] +user = user +command = sudo -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf -- cgit v1.2.3 From 4293e362af90fd61f22d5b88d926165e970e53db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=A2ne=20Pichou?= Date: Mon, 22 Oct 2018 14:37:40 +0200 Subject: Improve dev Dockerfile (#1333) * Improve dev Dockerfile Use Docker best-practices for the development Dockerfile. Save 3Mo. * Update support/docker/dev/Dockerfile Co-Authored-By: pichouk --- support/docker/dev/Dockerfile | 52 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 27 deletions(-) (limited to 'support/docker') diff --git a/support/docker/dev/Dockerfile b/support/docker/dev/Dockerfile index aa4a8a3d6..8e049f3f6 100644 --- a/support/docker/dev/Dockerfile +++ b/support/docker/dev/Dockerfile @@ -6,43 +6,41 @@ ENV DEBIAN_FRONTEND=noninteractive # Install PeerTube's dependencies. # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies RUN apt-get update -q && apt-get install -qy \ - curl \ - nano \ - ffmpeg \ - postgresql \ - postgresql-contrib \ - openssl \ - g++ \ - make \ - redis-server \ - git \ - gnupg - -# Install NodeJS 8.x -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ - apt-get install -y nodejs - -# Install Yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ - apt-get update && apt-get install yarn + curl \ + ffmpeg \ + g++ \ + git \ + gnupg \ + make \ + nano \ + openssl \ + postgresql \ + postgresql-contrib \ + redis-server \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -qy nodejs yarn \ + && rm -rf /var/lib/apt/lists/* # Download PeerTube's source code. RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube WORKDIR /home/user/PeerTube -# Install dependencies. -RUN yarn install --pure-lockfile - -# Configure and run PeerTube. +# Copy postgresql setup script COPY setup_postgres.sql /tmp/ -RUN service postgresql start \ - && su postgres -c "psql --file=/tmp/setup_postgres.sql" + +# Install Node.js dependencies and setup PostgreSQL +RUN yarn install --pure-lockfile \ + && service postgresql start \ + && su postgres -c "psql --file=/tmp/setup_postgres.sql" # Expose PeerTube sources as a volume VOLUME /home/user/PeerTube +# Expose API and frontend EXPOSE 3000 9000 # Start PostgreSQL and Redis -CMD service postgresql start && redis-server +CMD ["service postgresql start && redis-server"] -- cgit v1.2.3 From eff7cdd7b7c3667ac17312d49104488aaf698ba2 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Mon, 22 Oct 2018 19:11:01 +0200 Subject: Configure docker image to accept trust_proxy as an env variable in json array (#1338) --- support/docker/production/.env | 5 ++++- support/docker/production/config/custom-environment-variables.yaml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'support/docker') diff --git a/support/docker/production/.env b/support/docker/production/.env index 8af161b2a..4a649d655 100644 --- a/support/docker/production/.env +++ b/support/docker/production/.env @@ -3,7 +3,10 @@ PEERTUBE_DB_PASSWORD=postgres_password PEERTUBE_WEBSERVER_HOSTNAME=domain.tld PEERTUBE_WEBSERVER_PORT=443 PEERTUBE_WEBSERVER_HTTPS=true -PEERTUBE_TRUST_PROXY=127.0.0.1 +# If you need more than one IP as trust_proxy +# pass them as a comma separated array: +PEERTUBE_TRUST_PROXY=["127.0.0.1"] +#PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "192.168.1.0/24"] PEERTUBE_SMTP_USERNAME= PEERTUBE_SMTP_PASSWORD= PEERTUBE_SMTP_HOSTNAME= diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml index 1f7fbf849..cfc30632c 100644 --- a/support/docker/production/config/custom-environment-variables.yaml +++ b/support/docker/production/config/custom-environment-variables.yaml @@ -7,7 +7,9 @@ webserver: __name: "PEERTUBE_WEBSERVER_HTTPS" __format: "json" -trust_proxy: "PEERTUBE_TRUST_PROXY" +trust_proxy: + __name: "PEERTUBE_TRUST_PROXY" + __format: "json" database: hostname: "PEERTUBE_DB_HOSTNAME" -- cgit v1.2.3 From fef13f148028f0922c0643eee999f141fee3a2c7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 21 Nov 2018 15:35:26 +0100 Subject: Various improvements for docker-compose --- support/docker/production/.env | 2 +- support/docker/production/config/traefik.toml | 3 +++ support/docker/production/docker-compose.yml | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'support/docker') diff --git a/support/docker/production/.env b/support/docker/production/.env index 4a649d655..f27def3b4 100644 --- a/support/docker/production/.env +++ b/support/docker/production/.env @@ -9,7 +9,7 @@ PEERTUBE_TRUST_PROXY=["127.0.0.1"] #PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "192.168.1.0/24"] PEERTUBE_SMTP_USERNAME= PEERTUBE_SMTP_PASSWORD= -PEERTUBE_SMTP_HOSTNAME= +PEERTUBE_SMTP_HOSTNAME=postfix PEERTUBE_SMTP_PORT=25 PEERTUBE_SMTP_FROM=noreply@domain.tld PEERTUBE_SMTP_TLS=true diff --git a/support/docker/production/config/traefik.toml b/support/docker/production/config/traefik.toml index 882c95548..6abced3db 100644 --- a/support/docker/production/config/traefik.toml +++ b/support/docker/production/config/traefik.toml @@ -1,9 +1,12 @@ # Uncomment this line in order to enable debugging through logs # debug = true defaultEntryPoints = ["http", "https"] + [entryPoints] [entryPoints.http] address = ":80" + [entryPoints.http.redirect] + entryPoint = "https" [entryPoints.https] address = ":443" [entryPoints.https.tls] diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml index 220c19fba..1b0a28ffb 100644 --- a/support/docker/production/docker-compose.yml +++ b/support/docker/production/docker-compose.yml @@ -4,16 +4,19 @@ services: reverse-proxy: image: traefik - command: --api --docker # Enables the web UI and tells Træfik to listen to docker + command: --docker # Tells Træfik to listen to docker ports: - "80:80" # The HTTP port - "443:443" # The HTTPS port - - "8080:8080" # The Web UI (enabled by --api) volumes: - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events - ./docker-volume/traefik/acme.json:/etc/acme.json - ./docker-volume/traefik/traefik.toml:/traefik.toml restart: "always" + # If you want to use the Traefik dashboard, you should expose it on a + # subdomain with HTTPS and authentification: + # https://medium.com/@xavier.priour/secure-traefik-dashboard-with-https-and-password-in-docker-5b657e2aa15f + # https://github.com/containous/traefik/issues/880#issuecomment-310301168 peertube: # If you don't want to use the official image and build one from sources @@ -38,6 +41,7 @@ services: depends_on: - postgres - redis + - postfix restart: "always" postgres: @@ -59,3 +63,11 @@ services: restart: "always" labels: traefik.enable: "false" + + postfix: + image: mwader/postfix-relay + environment: + - POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME} + labels: + traefik.enable: "false" + restart: "always" -- cgit v1.2.3 From 6040f87d143a5fa01db79867ece8197c3ce7be47 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 4 Dec 2018 16:02:49 +0100 Subject: Add tmp and redundancy directories --- support/docker/production/config/production.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'support/docker') diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml index 4970bbcca..846c838e8 100644 --- a/support/docker/production/config/production.yaml +++ b/support/docker/production/config/production.yaml @@ -32,8 +32,10 @@ redis: # From the project root directory storage: + tmp: '../data/tmp/' avatars: '../data/avatars/' videos: '../data/videos/' + redundancy: '../data/redundancy/' logs: '../data/logs/' previews: '../data/previews/' thumbnails: '../data/thumbnails/' -- cgit v1.2.3 From 73a48728ee708d7b7a1ae6ae3795e4af7b6af135 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Dec 2018 13:48:33 +0100 Subject: Fix docker build and gosu --- support/docker/production/Dockerfile.stretch | 31 +++++----------------------- 1 file changed, 5 insertions(+), 26 deletions(-) (limited to 'support/docker') diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch index 911d064f6..81468bb4f 100644 --- a/support/docker/production/Dockerfile.stretch +++ b/support/docker/production/Dockerfile.stretch @@ -20,32 +20,11 @@ RUN groupadd -r peertube \ && useradd -r -g peertube -m peertube # grab gosu for easy step-down from root -# https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.10 -RUN set -ex; \ - \ - fetchDeps='ca-certificates wget'; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - rm -rf /var/lib/apt/lists/*; \ - \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for server in $(shuf -e ha.pool.sks-keyservers.net \ - hkp://p80.pool.sks-keyservers.net:80 \ - keyserver.ubuntu.com \ - hkp://keyserver.ubuntu.com:80 \ - pgp.mit.edu) ; do \ - gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || : ; \ - done; \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ - chmod +x /usr/local/bin/gosu; \ - gosu nobody true; \ - \ - apt-get purge -y --auto-remove wget +RUN set -eux; \ + apt-get update; \ + apt-get install -y gosu; \ + rm -rf /var/lib/apt/lists/*; \ + gosu nobody true # Install PeerTube WORKDIR /app -- cgit v1.2.3 From 5e755fff9d70a7fd3c4f85bb524f1b774dd85b25 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 13 Dec 2018 09:49:45 +0100 Subject: add Content Security Policy (#1252) * add Content Security Policy * remove reflect-metadata on production builds to get rid of unsafe-eval * fix baseCSP usage * add SRI to CSP * add blob: to media-src * remove SRI * CSP set to reportOnly * adding data: to connect-src CSP * remove block-all-mixed-content * add report-uri support --- support/docker/production/config/custom-environment-variables.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'support/docker') diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml index cfc30632c..550f1ad80 100644 --- a/support/docker/production/config/custom-environment-variables.yaml +++ b/support/docker/production/config/custom-environment-variables.yaml @@ -101,9 +101,11 @@ transcoding: 1080: __name: "PEERTUBE_TRANSCODING_1080P" __format: "json" - instance: name: "PEERTUBE_INSTANCE_NAME" description: "PEERTUBE_INSTANCE_DESCRIPTION" terms: "PEERTUBE_INSTANCE_TERMS" + +services: + csp-logger: "PEERTUBE_SERVICES_CSPLOGGER" -- cgit v1.2.3 From a4101923e699e49ceb9ff36e971c75417fafc9f0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 9 Jan 2019 15:14:29 +0100 Subject: Implement contact form on server side --- support/docker/production/.env | 1 + support/docker/production/config/custom-environment-variables.yaml | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'support/docker') diff --git a/support/docker/production/.env b/support/docker/production/.env index f27def3b4..802d6b2ca 100644 --- a/support/docker/production/.env +++ b/support/docker/production/.env @@ -18,3 +18,4 @@ PEERTUBE_ADMIN_EMAIL=admin@domain.tld # /!\ Prefer to use the PeerTube admin interface to set the following configurations /!\ #PEERTUBE_SIGNUP_ENABLED=true #PEERTUBE_TRANSCODING_ENABLED=true +#PEERTUBE_CONTACT_FORM_ENABLED=true diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml index 550f1ad80..8604939aa 100644 --- a/support/docker/production/config/custom-environment-variables.yaml +++ b/support/docker/production/config/custom-environment-variables.yaml @@ -50,6 +50,11 @@ user: admin: email: "PEERTUBE_ADMIN_EMAIL" +contact_form: + enabled: + __name: "PEERTUBE_CONTACT_FORM_ENABLED" + __format: "json" + signup: enabled: __name: "PEERTUBE_SIGNUP_ENABLED" -- cgit v1.2.3 From e902e03f0fd2eded99d635b1f9d2c59f417c4721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?victor=20h=C3=A9ry?= Date: Sun, 13 Jan 2019 14:21:58 +0100 Subject: Patch docker entrypoint to speed up the chown at startup --- support/docker/production/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'support/docker') diff --git a/support/docker/production/docker-entrypoint.sh b/support/docker/production/docker-entrypoint.sh index 6dbbfddf6..7dd626b9f 100755 --- a/support/docker/production/docker-entrypoint.sh +++ b/support/docker/production/docker-entrypoint.sh @@ -9,7 +9,7 @@ fi # Always copy default and custom env configuration file, in cases where new keys were added cp /app/config/default.yaml /config cp /app/support/docker/production/config/custom-environment-variables.yaml /config -chown -R peertube:peertube /config +find /config ! -user peertube -exec chown peertube:peertube {} \; # first arg is `-f` or `--some-option` # or first arg is `something.conf` @@ -19,7 +19,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then - chown -R peertube:peertube /data + find /data ! -user peertube -exec chown peertube:peertube {} \; exec gosu peertube "$0" "$@" fi -- cgit v1.2.3