aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/helpers/custom-validators/activitypub/misc.ts4
-rw-r--r--support/docker/production/.env7
-rw-r--r--support/docker/production/docker-compose.yml8
3 files changed, 10 insertions, 9 deletions
diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts
index ff15f115f..4619f0eb5 100644
--- a/server/helpers/custom-validators/activitypub/misc.ts
+++ b/server/helpers/custom-validators/activitypub/misc.ts
@@ -1,6 +1,6 @@
1import validator from 'validator' 1import validator from 'validator'
2import { CONFIG } from '@server/initializers/config'
2import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' 3import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
3import { isTestOrDevInstance } from '../../core-utils'
4import { exists } from '../misc' 4import { exists } from '../misc'
5 5
6function isUrlValid (url: string) { 6function isUrlValid (url: string) {
@@ -13,7 +13,7 @@ function isUrlValid (url: string) {
13 } 13 }
14 14
15 // We validate 'localhost', so we don't have the top level domain 15 // We validate 'localhost', so we don't have the top level domain
16 if (isTestOrDevInstance()) { 16 if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') {
17 isURLOptions.require_tld = false 17 isURLOptions.require_tld = false
18 } 18 }
19 19
diff --git a/support/docker/production/.env b/support/docker/production/.env
index 70743e0ec..4e7b21ab6 100644
--- a/support/docker/production/.env
+++ b/support/docker/production/.env
@@ -12,10 +12,11 @@ PEERTUBE_DB_SSL=false
12# Default to Postgres service name "postgres" in docker-compose.yml 12# Default to Postgres service name "postgres" in docker-compose.yml
13PEERTUBE_DB_HOSTNAME=postgres 13PEERTUBE_DB_HOSTNAME=postgres
14 14
15# Server configuration 15# PeerTube server configuration
16# If you test PeerTube in local: use "peertube.localhost" and add this domain to your host file resolving on 127.0.0.1
16PEERTUBE_WEBSERVER_HOSTNAME=<MY DOMAIN> 17PEERTUBE_WEBSERVER_HOSTNAME=<MY DOMAIN>
17# If you do not use https and a reverse-proxy in docker-compose.yml 18# If you just want to test PeerTube on local
18#PEERTUBE_WEBSERVER_PORT=80 19#PEERTUBE_WEBSERVER_PORT=9000
19#PEERTUBE_WEBSERVER_HTTPS=false 20#PEERTUBE_WEBSERVER_HTTPS=false
20# If you need more than one IP as trust_proxy 21# If you need more than one IP as trust_proxy
21# pass them as a comma separated array: 22# pass them as a comma separated array:
diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml
index cf90b226f..13f75f222 100644
--- a/support/docker/production/docker-compose.yml
+++ b/support/docker/production/docker-compose.yml
@@ -2,7 +2,7 @@ version: "3.3"
2 2
3services: 3services:
4 4
5 # You can comment this webserver section if you want to use another webserver/proxy 5 # You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
6 webserver: 6 webserver:
7 image: chocobozzz/peertube-webserver:latest 7 image: chocobozzz/peertube-webserver:latest
8 # If you don't want to use the official image and build one from sources: 8 # If you don't want to use the official image and build one from sources:
@@ -28,7 +28,7 @@ services:
28 - peertube 28 - peertube
29 restart: "always" 29 restart: "always"
30 30
31 # You can comment this certbot section if you want to use another webserver/proxy 31 # You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
32 certbot: 32 certbot:
33 container_name: certbot 33 container_name: certbot
34 image: certbot/certbot 34 image: certbot/certbot
@@ -55,8 +55,8 @@ services:
55 - .env 55 - .env
56 56
57 ports: 57 ports:
58 - "1935:1935" # If you don't want to use the live feature, you can comment this line 58 - "1935:1935" # Comment if you don't want to use the live feature
59 # - "9000:9000" # If you provide your own webserver and reverse-proxy, otherwise not suitable for production 59 # - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
60 volumes: 60 volumes:
61 - assets:/app/client/dist 61 - assets:/app/client/dist
62 - ./docker-volume/data:/data 62 - ./docker-volume/data:/data