Add ability to use docker on local
This commit is contained in:
parent
f4057afd20
commit
b1053a30f6
|
@ -1,6 +1,6 @@
|
||||||
import validator from 'validator'
|
import validator from 'validator'
|
||||||
|
import { CONFIG } from '@server/initializers/config'
|
||||||
import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
|
import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
|
||||||
import { isTestOrDevInstance } from '../../core-utils'
|
|
||||||
import { exists } from '../misc'
|
import { exists } from '../misc'
|
||||||
|
|
||||||
function isUrlValid (url: string) {
|
function isUrlValid (url: string) {
|
||||||
|
@ -13,7 +13,7 @@ function isUrlValid (url: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We validate 'localhost', so we don't have the top level domain
|
// We validate 'localhost', so we don't have the top level domain
|
||||||
if (isTestOrDevInstance()) {
|
if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') {
|
||||||
isURLOptions.require_tld = false
|
isURLOptions.require_tld = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,11 @@ PEERTUBE_DB_SSL=false
|
||||||
# Default to Postgres service name "postgres" in docker-compose.yml
|
# Default to Postgres service name "postgres" in docker-compose.yml
|
||||||
PEERTUBE_DB_HOSTNAME=postgres
|
PEERTUBE_DB_HOSTNAME=postgres
|
||||||
|
|
||||||
# Server configuration
|
# PeerTube server configuration
|
||||||
|
# If you test PeerTube in local: use "peertube.localhost" and add this domain to your host file resolving on 127.0.0.1
|
||||||
PEERTUBE_WEBSERVER_HOSTNAME=<MY DOMAIN>
|
PEERTUBE_WEBSERVER_HOSTNAME=<MY DOMAIN>
|
||||||
# If you do not use https and a reverse-proxy in docker-compose.yml
|
# If you just want to test PeerTube on local
|
||||||
#PEERTUBE_WEBSERVER_PORT=80
|
#PEERTUBE_WEBSERVER_PORT=9000
|
||||||
#PEERTUBE_WEBSERVER_HTTPS=false
|
#PEERTUBE_WEBSERVER_HTTPS=false
|
||||||
# If you need more than one IP as trust_proxy
|
# If you need more than one IP as trust_proxy
|
||||||
# pass them as a comma separated array:
|
# pass them as a comma separated array:
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: "3.3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# You can comment this webserver section if you want to use another webserver/proxy
|
# You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
|
||||||
webserver:
|
webserver:
|
||||||
image: chocobozzz/peertube-webserver:latest
|
image: chocobozzz/peertube-webserver:latest
|
||||||
# If you don't want to use the official image and build one from sources:
|
# If you don't want to use the official image and build one from sources:
|
||||||
|
@ -28,7 +28,7 @@ services:
|
||||||
- peertube
|
- peertube
|
||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
# You can comment this certbot section if you want to use another webserver/proxy
|
# You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
|
||||||
certbot:
|
certbot:
|
||||||
container_name: certbot
|
container_name: certbot
|
||||||
image: certbot/certbot
|
image: certbot/certbot
|
||||||
|
@ -55,8 +55,8 @@ services:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "1935:1935" # If you don't want to use the live feature, you can comment this line
|
- "1935:1935" # Comment if you don't want to use the live feature
|
||||||
# - "9000:9000" # If you provide your own webserver and reverse-proxy, otherwise not suitable for production
|
# - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
|
||||||
volumes:
|
volumes:
|
||||||
- assets:/app/client/dist
|
- assets:/app/client/dist
|
||||||
- ./docker-volume/data:/data
|
- ./docker-volume/data:/data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user