Installing peertube as docker in localhost machine fails

I was trying a test installation of the peertube docker before taking it to live server.
In my test machine laptop, Ive already nginx,postgres running. I tried a normal installation first though it failed probably because I dont have static IP/DNS and hence the letsecrypt configuration step failed. Later I tried the docker method and specified my hostname as videos.sonnet.in.
But the docker installation failed giving authentication fail.

Following is the excerpt of the output of docker-compose up

Starting peertube_redis_1         ... done
Starting peertube_postfix_1       ... done
Starting peertube_postgres_1      ... done
Starting peertube_reverse-proxy_1 ... done
Starting peertube_peertube_1      ... done

Attaching to peertube_reverse-proxy_1, peertube_postfix_1, peertube_redis_1, peertube_postgres_1, peertube_peertube_1
e[33mpostfix_1        |e[0m Starting Postfix Mail Transport Agent: postfix.
e[33mpostfix_1        |e[0m rsyslogd:  [origin software="rsyslogd" swVersion="8.1901.0" x-pid="20" x-info="https://www.rsyslog.com"] start
e[32mpostgres_1       |e[0m 
e[32mpostgres_1       |e[0m PostgreSQL Database directory appears to contain a database; Skipping initialization
e[32mpostgres_1       |e[0m 
e[32mpostgres_1       |e[0m 2020-05-30 03:02:11.895 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
e[32mpostgres_1       |e[0m 2020-05-30 03:02:11.895 UTC [1] LOG:  listening on IPv6 address "::", port 5432
e[32mpostgres_1       |e[0m 2020-05-30 03:02:12.538 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:13.016 UTC [20] LOG:  database system was shut down at 2020-05-30 02:52:11 UTC
e[32mpostgres_1       |e[0m 2020-05-30 03:02:13.142 UTC [1] LOG:  database system is ready to accept connections
e[35mredis_1          |e[0m 1:C 30 May 03:02:11.176 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
e[35mredis_1          |e[0m 1:C 30 May 03:02:11.176 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
e[35mredis_1          |e[0m 1:C 30 May 03:02:11.176 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 * Running mode=standalone, port=6379.
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 # Server initialized
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 * DB loaded from disk: 0.000 seconds
e[35mredis_1          |e[0m 1:M 30 May 03:02:11.178 * Ready to accept connections
e[34mreverse-proxy_1  |e[0m time="2020-05-30T03:02:10Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[36mpeertube_1       |e[0m 
e[36mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[36mpeertube_1       |e[0m > node dist/server
e[36mpeertube_1       |e[0m 
e[34mpeertube_reverse-proxy_1 exited with code 1
e[0me[36mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:18.381 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[36;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:19Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:19.248 UTC [27] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:19.248 UTC [27] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[36mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:19.259 e[31merrore[39m: Cannot start application. {
e[36mpeertube_1       |e[0m   "err": {
e[36mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[36mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[36mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[36mpeertube_1       |e[0m     "parent": {
e[36mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[36mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[36mpeertube_1       |e[0m       "name": "error",
e[36mpeertube_1       |e[0m       "length": 112,
e[36mpeertube_1       |e[0m       "severity": "FATAL",
e[36mpeertube_1       |e[0m       "code": "28P01",
e[36mpeertube_1       |e[0m       "file": "auth.c",
e[36mpeertube_1       |e[0m       "line": "326",
e[36mpeertube_1       |e[0m       "routine": "auth_failed"
e[36mpeertube_1       |e[0m     }
e[36mpeertube_1       |e[0m   }
e[36mpeertube_1       |e[0m }
e[36mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[36mpeertube_1       |e[0m npm ERR! errno 255
e[36mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[36mpeertube_1       |e[0m npm ERR! Exit status 255
e[36mpeertube_1       |e[0m npm ERR! 
e[36mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[36mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[36mpeertube_1       |e[0m 
e[36mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[36mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_02_19_324Z-debug.log
e[36;1mpeertube_reverse-proxy_1 exited with code 1
e[0me[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:09:58Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:00Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:04Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:07Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:09Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:12Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:17Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:26Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:10:41Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:11:09Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:12:01Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:03Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:42Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:45Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:48Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:50Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:52Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:13:56Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:14:01Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:14:09Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:14:23Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :80: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:14:51Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:14Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:18Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:21Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:24Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:26Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:29Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:34Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:43Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:49:58Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:50:25Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T02:51:18Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:10Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:15Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:19Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:22Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[35;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:25Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:25Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[32;1mpeertube_1       |e[0m 
e[32;1mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[32;1mpeertube_1       |e[0m > node dist/server
e[32;1mpeertube_1       |e[0m 
e[34;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:28Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[32;1mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:28.511 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[35;1mpeertube_reverse-proxy_1 exited with code 1
e[0me[33;1mpeertube_reverse-proxy_1 exited with code 1
e[0me[32mpostgres_1       |e[0m 2020-05-30 03:02:29.078 UTC [28] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:29.078 UTC [28] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[32;1mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:29.085 e[31merrore[39m: Cannot start application. {
e[32;1mpeertube_1       |e[0m   "err": {
e[32;1mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[32;1mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[32;1mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[32;1mpeertube_1       |e[0m     "parent": {
e[32;1mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[32;1mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[32;1mpeertube_1       |e[0m       "name": "error",
e[32;1mpeertube_1       |e[0m       "length": 112,
e[32;1mpeertube_1       |e[0m       "severity": "FATAL",
e[32;1mpeertube_1       |e[0m       "code": "28P01",
e[32;1mpeertube_1       |e[0m       "file": "auth.c",
e[32;1mpeertube_1       |e[0m       "line": "326",
e[32;1mpeertube_1       |e[0m       "routine": "auth_failed"
e[32;1mpeertube_1       |e[0m     }
e[32;1mpeertube_1       |e[0m   }
e[32;1mpeertube_1       |e[0m }
e[32;1mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[32;1mpeertube_1       |e[0m npm ERR! errno 255
e[32;1mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[32;1mpeertube_1       |e[0m npm ERR! Exit status 255
e[32;1mpeertube_1       |e[0m npm ERR! 
e[32;1mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[32;1mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[32;1mpeertube_1       |e[0m 
e[32;1mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[32;1mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_02_29_101Z-debug.log
e[36mpeertube_peertube_1 exited with code 255
e[0me[36mpeertube_1       |e[0m 
e[36mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[36mpeertube_1       |e[0m > node dist/server
e[36mpeertube_1       |e[0m 
e[33mreverse-proxy_1  |e[0m time="2020-05-30T03:02:33Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[34;1mpeertube_reverse-proxy_1 exited with code 1
e[0me[36mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:35.718 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[32mpostgres_1       |e[0m 2020-05-30 03:02:36.303 UTC [29] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:36.303 UTC [29] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[36mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:36.310 e[31merrore[39m: Cannot start application. {
e[36mpeertube_1       |e[0m   "err": {
e[36mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[36mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[36mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[36mpeertube_1       |e[0m     "parent": {
e[36mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[36mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[36mpeertube_1       |e[0m       "name": "error",
e[36mpeertube_1       |e[0m       "length": 112,
e[36mpeertube_1       |e[0m       "severity": "FATAL",
e[36mpeertube_1       |e[0m       "code": "28P01",
e[36mpeertube_1       |e[0m       "file": "auth.c",
e[36mpeertube_1       |e[0m       "line": "326",
e[36mpeertube_1       |e[0m       "routine": "auth_failed"
e[36mpeertube_1       |e[0m     }
e[36mpeertube_1       |e[0m   }
e[36mpeertube_1       |e[0m }
e[36mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[36mpeertube_1       |e[0m npm ERR! errno 255
e[36mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[36mpeertube_1       |e[0m npm ERR! Exit status 255
e[36mpeertube_1       |e[0m npm ERR! 
e[36mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[36mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[36mpeertube_1       |e[0m 
e[36mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[36mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_02_36_331Z-debug.log
e[32;1mpeertube_peertube_1 exited with code 255
e[0me[32mpeertube_1       |e[0m 
e[32mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[32mpeertube_1       |e[0m > node dist/server
e[32mpeertube_1       |e[0m 
e[35mreverse-proxy_1  |e[0m time="2020-05-30T03:02:41Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[32mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:42.582 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[33mpeertube_reverse-proxy_1 exited with code 1
e[0me[32mpostgres_1       |e[0m 2020-05-30 03:02:43.267 UTC [30] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:43.267 UTC [30] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[32mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:43.300 e[31merrore[39m: Cannot start application. {
e[32mpeertube_1       |e[0m   "err": {
e[32mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[32mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[32mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[32mpeertube_1       |e[0m     "parent": {
e[32mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[32mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[32mpeertube_1       |e[0m       "name": "error",
e[32mpeertube_1       |e[0m       "length": 112,
e[32mpeertube_1       |e[0m       "severity": "FATAL",
e[32mpeertube_1       |e[0m       "code": "28P01",
e[32mpeertube_1       |e[0m       "file": "auth.c",
e[32mpeertube_1       |e[0m       "line": "326",
e[32mpeertube_1       |e[0m       "routine": "auth_failed"
e[32mpeertube_1       |e[0m     }
e[32mpeertube_1       |e[0m   }
e[32mpeertube_1       |e[0m }
e[32mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[32mpeertube_1       |e[0m npm ERR! errno 255
e[32mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[32mpeertube_1       |e[0m npm ERR! Exit status 255
e[32mpeertube_1       |e[0m npm ERR! 
e[32mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[32mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[32mpeertube_1       |e[0m 
e[32mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[32mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_02_43_318Z-debug.log
e[36mpeertube_peertube_1 exited with code 255
e[0me[34mpeertube_1       |e[0m 
e[34mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[34mpeertube_1       |e[0m > node dist/server
e[34mpeertube_1       |e[0m 
e[34mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:49.635 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[32mpostgres_1       |e[0m 2020-05-30 03:02:50.337 UTC [31] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:50.337 UTC [31] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[34mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:50.344 e[31merrore[39m: Cannot start application. {
e[34mpeertube_1       |e[0m   "err": {
e[34mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[34mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[34mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[34mpeertube_1       |e[0m     "parent": {
e[34mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[34mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[34mpeertube_1       |e[0m       "name": "error",
e[34mpeertube_1       |e[0m       "length": 112,
e[34mpeertube_1       |e[0m       "severity": "FATAL",
e[34mpeertube_1       |e[0m       "code": "28P01",
e[34mpeertube_1       |e[0m       "file": "auth.c",
e[34mpeertube_1       |e[0m       "line": "326",
e[34mpeertube_1       |e[0m       "routine": "auth_failed"
e[34mpeertube_1       |e[0m     }
e[34mpeertube_1       |e[0m   }
e[34mpeertube_1       |e[0m }
e[34mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[34mpeertube_1       |e[0m npm ERR! errno 255
e[34mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[34mpeertube_1       |e[0m npm ERR! Exit status 255
e[34mpeertube_1       |e[0m npm ERR! 
e[34mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[34mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[34mpeertube_1       |e[0m 
e[34mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[34mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_02_50_362Z-debug.log
e[32mpeertube_peertube_1 exited with code 255
e[0me[36;1mpeertube_1       |e[0m 
e[36;1mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[36;1mpeertube_1       |e[0m > node dist/server
e[36;1mpeertube_1       |e[0m 
e[33;1mreverse-proxy_1  |e[0m time="2020-05-30T03:02:57Z" level=fatal msg="Error preparing server: error opening listener: listen tcp :443: bind: address already in use"
e[36;1mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:57.214 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[35mpeertube_reverse-proxy_1 exited with code 1
e[0me[32mpostgres_1       |e[0m 2020-05-30 03:02:57.981 UTC [32] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:02:57.981 UTC [32] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[36;1mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:02:57.988 e[31merrore[39m: Cannot start application. {
e[36;1mpeertube_1       |e[0m   "err": {
e[36;1mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[36;1mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[36;1mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[36;1mpeertube_1       |e[0m     "parent": {
e[36;1mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[36;1mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[36;1mpeertube_1       |e[0m       "name": "error",
e[36;1mpeertube_1       |e[0m       "length": 112,
e[36;1mpeertube_1       |e[0m       "severity": "FATAL",
e[36;1mpeertube_1       |e[0m       "code": "28P01",
e[36;1mpeertube_1       |e[0m       "file": "auth.c",
e[36;1mpeertube_1       |e[0m       "line": "326",
e[36;1mpeertube_1       |e[0m       "routine": "auth_failed"
e[36;1mpeertube_1       |e[0m     }
e[36;1mpeertube_1       |e[0m   }
e[36;1mpeertube_1       |e[0m }
e[36;1mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[36;1mpeertube_1       |e[0m npm ERR! errno 255
e[36;1mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[36;1mpeertube_1       |e[0m npm ERR! Exit status 255
e[36;1mpeertube_1       |e[0m npm ERR! 
e[36;1mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[36;1mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[36;1mpeertube_1       |e[0m 
e[36;1mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[36;1mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_02_58_010Z-debug.log
e[34mpeertube_peertube_1 exited with code 255
e[0me[32;1mpeertube_1       |e[0m 
e[32;1mpeertube_1       |e[0m > peertube@2.1.1 start /app
e[32;1mpeertube_1       |e[0m > node dist/server
e[32;1mpeertube_1       |e[0m 
e[32;1mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:03:06.529 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[32mpostgres_1       |e[0m 2020-05-30 03:03:07.201 UTC [33] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
e[32mpostgres_1       |e[0m 2020-05-30 03:03:07.201 UTC [33] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
e[32mpostgres_1       |e[0m 	Connection matched pg_hba.conf line 95: "host all all all md5"
e[32;1mpeertube_1       |e[0m [videos.sonnet.in:443] 2020-05-30 03:03:07.211 e[31merrore[39m: Cannot start application. {
e[32;1mpeertube_1       |e[0m   "err": {
e[32;1mpeertube_1       |e[0m     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
e[32;1mpeertube_1       |e[0m     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[32;1mpeertube_1       |e[0m     "name": "SequelizeConnectionError",
e[32;1mpeertube_1       |e[0m     "parent": {
e[32;1mpeertube_1       |e[0m       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
e[32;1mpeertube_1       |e[0m       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
e[32;1mpeertube_1       |e[0m       "name": "error",
e[32;1mpeertube_1       |e[0m       "length": 112,
e[32;1mpeertube_1       |e[0m       "severity": "FATAL",
e[32;1mpeertube_1       |e[0m       "code": "28P01",
e[32;1mpeertube_1       |e[0m       "file": "auth.c",
e[32;1mpeertube_1       |e[0m       "line": "326",
e[32;1mpeertube_1       |e[0m       "routine": "auth_failed"
e[32;1mpeertube_1       |e[0m     }
e[32;1mpeertube_1       |e[0m   }
e[32;1mpeertube_1       |e[0m }
e[32;1mpeertube_1       |e[0m npm ERR! code ELIFECYCLE
e[32;1mpeertube_1       |e[0m npm ERR! errno 255
e[32;1mpeertube_1       |e[0m npm ERR! peertube@2.1.1 start: `node dist/server`
e[32;1mpeertube_1       |e[0m npm ERR! Exit status 255
e[32;1mpeertube_1       |e[0m npm ERR! 
e[32;1mpeertube_1       |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[32;1mpeertube_1       |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[32;1mpeertube_1       |e[0m 
e[32;1mpeertube_1       |e[0m npm ERR! A complete log of this run can be found in:
e[32;1mpeertube_1       |e[0m npm ERR!     /home/peertube/.npm/_logs/2020-05-30T03_03_07_230Z-debug.log
e[36;1mpeertube_peertube_1 exited with code 255
e[0mGracefully stopping... (press Ctrl+C again to force)

Have you been following the docker guide? What is the content of your docker-compose.yml?

Your port 443 is already in use by some other web server software on your server, so either stop it or remove the reverse-proxy block from the docker-compose.yml.

yes i followed the docker guide. content of my docker-compose.yml

``
version: « 3.3 »

services:

reverse-proxy:
image: traefik:v1.7
network_mode: « host »
command: --docker # Tells Træfik to listen to docker
ports:
- « 81:81 » # The HTTP port
- « 443:443 » # The HTTPS port
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
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.buster
image: chocobozzz/peertube:production-buster
env_file:
- .env
# Traefik labels are suggested as an example for people using Traefik,
# remove them if you are using another reverse proxy.
labels:
traefik.enable: « true »
traefik.frontend.rule: « Host:${PEERTUBE_WEBSERVER_HOSTNAME} »
traefik.port: « 9000 »
# If you don’t want to use a reverse proxy (not suitable for production!)
# ports:
# - « 80:9000 »
volumes:
- ./docker-volume/data:/data
- ./docker-volume/config:/config
depends_on:
- postgres
- redis
- postfix
restart: « always »

postgres:
image: postgres:10-alpine
env_file:
- .env
volumes:
- ./docker-volume/db:/var/lib/postgresql/data
restart: « always »
labels:
traefik.enable: « false »

redis:
image: redis:4-alpine
volumes:
- ./docker-volume/redis:/data
restart: « always »
labels:
traefik.enable: « false »

postfix:
image: mwader/postfix-relay
env_file:
- .env
labels:
traefik.enable: « false »
restart: « always »

networks:
default:
ipam:
driver: default
config:
- subnet: 172.18.0.0/16
``

tried stopping nginx and started docker-compose up again.
It is still showing the same errors

reverse-proxy_1  | time="2020-05-30T15:30:05Z" level=error msg="undefined backend 'backend-peertube-peertube' for frontend frontend-Host-videos-sonnet-in-0. Skipping frontend frontend-Host-videos-sonnet-in-0..."
peertube_1       | 
peertube_1       | > peertube@2.1.1 start /app
peertube_1       | > node dist/server
peertube_1       | 
peertube_1       | [videos.sonnet.in:443] 2020-05-30 15:31:09.762 warn: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
postgres_1       | 2020-05-30 15:31:10.506 UTC [44] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
postgres_1       | 2020-05-30 15:31:10.506 UTC [44] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
postgres_1       | 	Connection matched pg_hba.conf line 95: "host all all all md5"
peertube_1       | [videos.sonnet.in:443] 2020-05-30 15:31:10.514 error: Cannot start application. {
peertube_1       |   "err": {
peertube_1       |     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
peertube_1       |     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
peertube_1       |     "name": "SequelizeConnectionError",
peertube_1       |     "parent": {
peertube_1       |       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
peertube_1       |       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
peertube_1       |       "name": "error",
peertube_1       |       "length": 112,
peertube_1       |       "severity": "FATAL",
peertube_1       |       "code": "28P01",
peertube_1       |       "file": "auth.c",
peertube_1       |       "line": "326",
peertube_1       |       "routine": "auth_failed"
peertube_1       |     }
peertube_1       |   }
peertube_1       | }
peertube_1       | npm ERR! code ELIFECYCLE
peertube_1       | npm ERR! errno 255
peertube_1       | npm ERR! peertube@2.1.1 start: `node dist/server`
peertube_1       | npm ERR! Exit status 255
peertube_1       | npm ERR! 
peertube_1       | npm ERR! Failed at the peertube@2.1.1 start script.
peertube_1       | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
peertube_1       | 
peertube_1       | npm ERR! A complete log of this run can be found in:
peertube_1       | npm ERR!     /home/peertube/.npm/_logs/2020-05-30T15_31_10_534Z-debug.log
peertube_peertube_1 exited with code 255
reverse-proxy_1  | time="2020-05-30T15:31:12Z" level=error msg="undefined backend 'backend-peertube-peertube' for frontend frontend-Host-videos-sonnet-in-0. Skipping frontend frontend-Host-videos-sonnet-in-0..."
^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[Apeertube_1       | 
peertube_1       | > peertube@2.1.1 start /app
peertube_1       | > node dist/server
peertube_1       | 
peertube_1       | [videos.sonnet.in:443] 2020-05-30 15:32:15.610 warn: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
postgres_1       | 2020-05-30 15:32:16.283 UTC [46] FATAL:  password authentication failed for user "$(POSTGRES_USER)"
postgres_1       | 2020-05-30 15:32:16.283 UTC [46] DETAIL:  Role "$(POSTGRES_USER)" does not exist.
postgres_1       | 	Connection matched pg_hba.conf line 95: "host all all all md5"
peertube_1       | [videos.sonnet.in:443] 2020-05-30 15:32:16.300 error: Cannot start application. {
peertube_1       |   "err": {
peertube_1       |     "stack": "SequelizeConnectionError: password authentication failed for user \"$(POSTGRES_USER)\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
peertube_1       |     "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
peertube_1       |     "name": "SequelizeConnectionError",
peertube_1       |     "parent": {
peertube_1       |       "stack": "error: password authentication failed for user \"$(POSTGRES_USER)\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
peertube_1       |       "message": "password authentication failed for user \"$(POSTGRES_USER)\"",
peertube_1       |       "name": "error",
peertube_1       |       "length": 112,
peertube_1       |       "severity": "FATAL",
peertube_1       |       "code": "28P01",
peertube_1       |       "file": "auth.c",
peertube_1       |       "line": "326",
peertube_1       |       "routine": "auth_failed"
peertube_1       |     }
peertube_1       |   }
peertube_1       | }
peertube_1       | npm ERR! code ELIFECYCLE
peertube_1       | npm ERR! errno 255
peertube_1       | npm ERR! peertube@2.1.1 start: `node dist/server`
peertube_1       | npm ERR! Exit status 255
peertube_1       | npm ERR! 
peertube_1       | npm ERR! Failed at the peertube@2.1.1 start script.
peertube_1       | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
peertube_1       | 
peertube_1       | npm ERR! A complete log of this run can be found in:
peertube_1       | npm ERR!     /home/peertube/.npm/_logs/2020-05-30T15_32_16_321Z-debug.log
^[[Apeertube_peertube_1 exited with code 255
^[[Areverse-proxy_1  | time="2020-05-30T15:32:17Z" level=error msg="undefined backend 'backend-peertube-peertube' for frontend frontend-Host-videos-sonnet-in-0. Skipping frontend frontend-Host-videos-sonnet-in-0..."

In the url bar typing https://localhost or https://videos.sonnet.in shows
404 page not found

output of sudo netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      624/redis-server 12 
tcp        0      0 127.0.1.1:5432          0.0.0.0:*               LISTEN      649/postgres        
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      649/postgres        
tcp6       0      0 ::1:6379                :::*                    LISTEN      624/redis-server 12 
tcp6       0      0 :::81                   :::*                    LISTEN      3465/traefik        
tcp6       0      0 ::1:5432                :::*                    LISTEN      649/postgres        
tcp6       0      0 :::443                  :::*                    LISTEN      3465/traefik        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           2154/dhclient       
udp        0      0 0.0.0.0:47757           0.0.0.0:*                           488/avahi-daemon: r 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           488/avahi-daemon: r 
udp6       0      0 :::57752                :::*                                488/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                488/avahi-daemon: r

What is the content of your .env? Could you please paste correctly your file? Indentation is important.

No it is not. Your first log complained about the port being occupied. Your second log, no more.

POSTGRES_USER=peertube
POSTGRES_PASSWORD=peertube
POSTGRES_DB=peertube
PEERTUBE_DB_USERNAME=$(POSTGRES_USER)
PEERTUBE_DB_PASSWORD=$(POSTGRES_PASSWORD)
PEERTUBE_DB_HOSTNAME=postgres
PEERTUBE_WEBSERVER_HOSTNAME=videos.sonnet.in
PEERTUBE_WEBSERVER_PORT=443
PEERTUBE_WEBSERVER_HTTPS=false
# If you need more than one IP as trust_proxy
# pass them as a comma separated array:
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16"]
#PEERTUBE_SMTP_USERNAME=
#PEERTUBE_SMTP_PASSWORD=
PEERTUBE_SMTP_HOSTNAME=postfix
PEERTUBE_SMTP_PORT=25
PEERTUBE_SMTP_FROM=noreply@videos.sonnet.in
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL=admin@videos.sonnet.in
POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME}
# /!\ 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

Hi,

You need to replace

PEERTUBE_DB_USERNAME=$(POSTGRES_USER)
PEERTUBE_DB_PASSWORD=$(POSTGRES_PASSWORD)

to same the values as POSTGRES_USER and POSTGRES_PASSWORD

PEERTUBE_DB_USERNAME=peertube
PEERTUBE_DB_PASSWORD=peertube

And postfix configuration

POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME}

to the same value as PEERTUBE_WEBSERVER_HOSTNAME

POSTFIX_myhostname=videos.sonnet.in

At last, if you use traefik as a reverse proxy, don’t forget to edit <MY EMAIL ADDRESS> and <MY DOMAIN> in ./docker-volume/traefik/traefik.toml for Let’s encrypt automatic SSL certificates generation.

1 « J'aime »

Made changes in .env and traefik.toml as you suggested. Also removed the installation of postgres and nginx. rebooted the machine and run docker-compose up.
Extract of the message:
Attaching to peertube_reverse-proxy_1, peertube_redis_1, peertube_postgres_1, peertube_postfix_1, peertube_peertube_1
e[32mpostgres_1 |e[0m
e[32mpostgres_1 |e[0m PostgreSQL Database directory appears to contain a database; Skipping initialization
e[32mpostgres_1 |e[0m
e[32mpostgres_1 |e[0m 2020-06-01 09:38:41.335 UTC [1] LOG: listening on IPv4 address « 0.0.0.0 », port 5432
e[32mpostgres_1 |e[0m 2020-06-01 09:38:41.335 UTC [1] LOG: listening on IPv6 address « :: », port 5432
e[32mpostgres_1 |e[0m 2020-06-01 09:38:41.403 UTC [1] LOG: listening on Unix socket « /var/run/postgresql/.s.PGSQL.5432 »
e[32mpostgres_1 |e[0m 2020-06-01 09:38:41.624 UTC [22] LOG: database system was shut down at 2020-06-01 09:37:20 UTC
e[32mpostgres_1 |e[0m 2020-06-01 09:38:41.762 UTC [1] LOG: database system is ready to accept connections
e[35mredis_1 |e[0m 1:C 01 Jun 09:38:40.724 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
e[35mredis_1 |e[0m 1:C 01 Jun 09:38:40.724 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
e[35mredis_1 |e[0m 1:C 01 Jun 09:38:40.724 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 * Running mode=standalone, port=6379.
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 # Server initialized
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‹ vm.overcommit_memory = 1 › to /etc/sysctl.conf and then reboot or run the command ‹ sysctl vm.overcommit_memory=1 › for this to take effect.
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‹ echo never > /sys/kernel/mm/transparent_hugepage/enabled › as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 * DB loaded from disk: 0.000 seconds
e[35mredis_1 |e[0m 1:M 01 Jun 09:38:40.727 * Ready to accept connections
e[36mpeertube_1 |e[0m
e[36mpeertube_1 |e[0m > peertube@2.1.1 start /app
e[36mpeertube_1 |e[0m > node dist/server
e[36mpeertube_1 |e[0m
e[33mpostfix_1 |e[0m Starting Postfix Mail Transport Agent: postfix.
e[33mpostfix_1 |e[0m rsyslogd: [origin software=« rsyslogd » swVersion=« 8.1901.0 » x-pid=« 120 » x-info=« https://www.rsyslog.com »] start
e[33mpostfix_1 |e[0m postfix/master[119]: daemon started – version 3.4.8, configuration /etc/postfix
e[36mpeertube_1 |e[0m [videos.sonnet.in:443] 2020-06-01 09:38:47.007 e[33mwarne[39m: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
e[32mpostgres_1 |e[0m 2020-06-01 09:38:47.756 UTC [29] FATAL: password authentication failed for user « peertube »
e[32mpostgres_1 |e[0m 2020-06-01 09:38:47.756 UTC [29] DETAIL: Password does not match for user « peertube ».
e[32mpostgres_1 |e[0m Connection matched pg_hba.conf line 95: « host all all all md5 »
e[36mpeertube_1 |e[0m [videos.sonnet.in:443] 2020-06-01 09:38:47.763 e[31merrore[39m: Cannot start application. {
e[36mpeertube_1 |e[0m « err »: {
e[36mpeertube_1 |e[0m « stack »: « SequelizeConnectionError: password authentication failed for user « peertube »\n at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n at Connection.emit (events.js:198:13)\n at Socket. (/app/node_modules/pg/lib/connection.js:128:12)\n at Socket.emit (events.js:198:13)\n at addChunk (_stream_readable.js:288:12)\n at readableAddChunk (_stream_readable.js:269:11)\n at Socket.Readable.push (_stream_readable.js:224:10)\n at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) »,
e[36mpeertube_1 |e[0m « message »: « password authentication failed for user « peertube » »,
e[36mpeertube_1 |e[0m « name »: « SequelizeConnectionError »,
e[36mpeertube_1 |e[0m « parent »: {
e[36mpeertube_1 |e[0m « stack »: « error: password authentication failed for user « peertube »\n at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n at Socket. (/app/node_modules/pg/lib/connection.js:123:22)\n at Socket.emit (events.js:198:13)\n at addChunk (_stream_readable.js:288:12)\n at readableAddChunk (_stream_readable.js:269:11)\n at Socket.Readable.push (_stream_readable.js:224:10)\n at TCP.onStreamRead (internal/stream_base_commons.js:94:17) »,
e[36mpeertube_1 |e[0m « message »: « password authentication failed for user « peertube » »,
e[36mpeertube_1 |e[0m « name »: « error »,
e[36mpeertube_1 |e[0m « length »: 104,
e[36mpeertube_1 |e[0m « severity »: « FATAL »,
e[36mpeertube_1 |e[0m « code »: « 28P01 »,
e[36mpeertube_1 |e[0m « file »: « auth.c »,
e[36mpeertube_1 |e[0m « line »: « 326 »,
e[36mpeertube_1 |e[0m « routine »: « auth_failed »
e[36mpeertube_1 |e[0m }
e[36mpeertube_1 |e[0m }
e[36mpeertube_1 |e[0m }
e[36mpeertube_1 |e[0m npm ERR! code ELIFECYCLE
e[36mpeertube_1 |e[0m npm ERR! errno 255
e[36mpeertube_1 |e[0m npm ERR! peertube@2.1.1 start: node dist/server
e[36mpeertube_1 |e[0m npm ERR! Exit status 255
e[36mpeertube_1 |e[0m npm ERR!
e[36mpeertube_1 |e[0m npm ERR! Failed at the peertube@2.1.1 start script.
e[36mpeertube_1 |e[0m npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
e[36mpeertube_1 |e[0m
e[36mpeertube_1 |e[0m npm ERR! A complete log of this run can be found in:
e[36mpeertube_1 |e[0m npm ERR! /home/peertube/.npm/_logs/2020-06-01T09_38_47_783Z-debug.log
e[34mreverse-proxy_1 |e[0m time=« 2020-06-01T09:38:47Z » level=error msg=« Unable to obtain ACME certificate for domains « videos.sonnet.in » : unable to generate a certificate for the domains [videos.sonnet.in]: acme: Error -> One or more domains had a problem:\n[videos.sonnet.in] acme: error: 400 :: urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up A for videos.sonnet.in - check that a DNS record exists for this domain, url: \n »
e[34mreverse-proxy_1 |e[0m time=« 2020-06-01T09:38:51Z » level=error msg=« undefined backend ‹ backend-peertube-peertube › for frontend frontend-Host-videos-sonnet-in-0. Skipping frontend frontend-Host-videos-sonnet-in-0… »

Destroy your existing potsgresql volume, its user doesn’t have the new user/password.

And again, please paste correctly, otherwise it is a pain to read :sweat:

1 « J'aime »

how can I destroy the existing postgres volume.

~/peertube/docker-volume$ ls
config  data  db  redis  traefik

Is it the db direcotory

Tried

docker-compose down --volumes
to destroy the volume and run docker-compose up again

I got the errors as below

peertube_1       | [videos.sonnet.in:443] 2020-06-05 17:13:14.038 warn: Directory of streaming_playlists should not be in the production directory of PeerTube. Please check your production configuration file.
postgres_1       | 2020-06-05 17:13:14.795 UTC [32] FATAL:  password authentication failed for user "peertube"
postgres_1       | 2020-06-05 17:13:14.795 UTC [32] DETAIL:  Password does not match for user "peertube".
postgres_1       | 	Connection matched pg_hba.conf line 95: "host all all all md5"
peertube_1       | [videos.sonnet.in:443] 2020-06-05 17:13:14.853 error: Cannot start application. {
peertube_1       |   "err": {
peertube_1       |     "stack": "SequelizeConnectionError: password authentication failed for user \"peertube\"\n    at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n    at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:194:14)\n    at Connection.emit (events.js:198:13)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:128:12)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)",
peertube_1       |     "message": "password authentication failed for user \"peertube\"",
peertube_1       |     "name": "SequelizeConnectionError",
peertube_1       |     "parent": {
peertube_1       |       "stack": "error: password authentication failed for user \"peertube\"\n    at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)\n    at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)\n    at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)",
peertube_1       |       "message": "password authentication failed for user \"peertube\"",
peertube_1       |       "name": "error",
peertube_1       |       "length": 104,
peertube_1       |       "severity": "FATAL",
peertube_1       |       "code": "28P01",
peertube_1       |       "file": "auth.c",
peertube_1       |       "line": "326",
peertube_1       |       "routine": "auth_failed"
peertube_1       |     }
peertube_1       |   }
peertube_1       | }
peertube_1       | npm ERR! code ELIFECYCLE
peertube_1       | npm ERR! errno 255
peertube_1       | npm ERR! peertube@2.1.1 start: `node dist/server`
peertube_1       | npm ERR! Exit status 255
peertube_1       | npm ERR! 
peertube_1       | npm ERR! Failed at the peertube@2.1.1 start script.
peertube_1       | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
peertube_1       | 
peertube_1       | npm ERR! A complete log of this run can be found in:
peertube_1       | npm ERR!     /home/peertube/.npm/_logs/2020-06-05T17_13_14_877Z-debug.log
peertube_reverse-proxy_1 exited with code 0
peertube_peertube_1 exited with code 255
peertube_peertube_1 exited with code 255
postgres_1       | 2020-06-05 17:13:17.404 UTC [1] LOG:  received smart shutdown request
redis_1          | 1:signal-handler (1591377197) Received SIGTERM scheduling shutdown...
postgres_1       | 2020-06-05 17:13:17.456 UTC [1] LOG:  worker process: logical replication launcher (PID 28) exited with exit code 1
postgres_1       | 2020-06-05 17:13:17.457 UTC [23] LOG:  shutting down
redis_1          | 1:M 05 Jun 17:13:17.495 # User requested shutdown...
redis_1          | 1:M 05 Jun 17:13:17.495 * Saving the final RDB snapshot before exiting.
postfix_1        | Stopping Postfix Mail Transport Agent: postfixpostfix/master[126]: terminating on signal 15
redis_1          | 1:M 05 Jun 17:13:17.555 * DB saved on disk
redis_1          | 1:M 05 Jun 17:13:17.555 # Redis is now ready to exit, bye bye...
postfix_1        | .
postfix_1        | Stopping OpenDKIM: No /usr/sbin/opendkim found running; none killed.
postfix_1        | opendkim.
postgres_1       | 2020-06-05 17:13:17.949 UTC [1] LOG:  database system is shut down
peertube_redis_1 exited with code 0
peertube_postgres_1 exited with code 0
peertube_postfix_1 exited with code 0

docker-compose down --volumes works for pure docker volumes. PeerTube uses binded volumes as you could see by the directories created locally. Delete the db directory.

Hurray, It works!!

Friends, hello!

I didn’t create a new topic as I saw a similar problem here? I also don’t start container with error

peertube_webserver_1 exited with code 1

logs

webserver_1 | 2023/11/01 19:17:18 [emerg] 9#9: cannot load certificate "/etc/letsencrypt/live/.ru/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/.ru/fullchain.pem, r) error:10000080:BIO routines::no such file)
webserver_1 | nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/.ru/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/.ru/fullchain.pem, r) error:10000080:BIO routines::no such file)
webserver_1 | 2023/11/01 19:18:27 [warn] 9#9: the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:23
webserver_1 | nginx: [warn] the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:23
webserver_1 | 2023/11/01 19:18:27 [warn] 9#9: the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:24
webserver_1 | nginx: [warn] the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:24
webserver_1 | 2023/11/01 19:18:27 [emerg] 9#9: cannot load certificate "/etc/letsencrypt/live/.ru/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/.ru/fullchain.pem, r) error:10000080:BIO routines::no such file)
webserver_1 | nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/.ru/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/.ru/fullchain.pem, r) error:10000080:BIO routines::no such file)
webserver_1 | 2023/11/01 19:19:59 [warn] 9#9: the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:23
webserver_1 | nginx: [warn] the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:23
webserver_1 | 2023/11/01 19:19:59 [warn] 9#9: the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:24
webserver_1 | nginx: [warn] the « listen … http2 » directive is deprecated, use the « http2 » directive instead in /etc/nginx/conf.d/default.conf:24
webserver_1 | 2023/11/01 19:19:59 [emerg] 9#9: cannot load certificate "/etc/letsencrypt/live/.ru/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/.ru/fullchain.pem, r) error:10000080:BIO routines::no such file)
webserver_1 | nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/.ru/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/.ru/fullchain.pem, r) error:10000080:BIO routines::no such file)
peertube_webserver_1 exited with code 1

docker-compose.yml

version: « 3.3 »

services:

You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local

webserver:
image: chocobozzz/peertube-webserver:latest
# If you don’t want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: Dockerfile.nginx
env_file:
- .env
ports:
- « 81:81 »
- « 444:444 »
volumes:
- type: bind
# Switch sources if you downloaded the whole repository
#source: …/…/nginx/peertube
source: ./docker-volume/nginx/peertube
target: /etc/nginx/conf.d/peertube.template
- assets:/var/www/peertube/peertube-latest/client/dist:ro
- ./docker-volume/data:/var/www/peertube/storage
- certbot-www:/var/www/certbot
- ./docker-volume/certbot/conf:/etc/letsencrypt
depends_on:
- peertube
restart: « always »

You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local

certbot:
container_name: certbot
image: certbot/certbot
volumes:
- ./docker-volume/certbot/conf:/etc/letsencrypt
- certbot-www:/var/www/certbot
restart: unless-stopped
entrypoint: /bin/sh -c « trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done; »
depends_on:
- webserver

peertube:
# If you don’t want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.bullseye
image: chocobozzz/peertube:production-bullseye
# Use a static IP for this container because nginx does not handle proxy host change without reload
# This container could be restarted on crash or until the postgresql database is ready for connection
networks:
default:
ipv4_address: 172.18.0.42
env_file:
- .env

ports:
 - "1935:1935" # Comment if you don't want to use the live feature
#  - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
volumes:
  - assets:/app/client/dist
  - ./docker-volume/data:/data
  - ./docker-volume/config:/config
depends_on:
  - postgres
  - redis
  - postfix
restart: "always"

postgres:
image: postgres:13-alpine
env_file:
- .env
volumes:
- ./docker-volume/db:/var/lib/postgresql/data
restart: « always »

redis:
image: redis:6-alpine
volumes:
- ./docker-volume/redis:/data
restart: « always »

postfix:
image: mwader/postfix-relay
env_file:
- .env
volumes:
- ./docker-volume/opendkim/keys:/etc/opendkim/keys
restart: « always »

networks:
default:
ipam:
driver: default
config:
- subnet: 172.18.0.0/16

volumes:
assets:
certbot-www:

.env

Database / Postgres service configuration

POSTGRES_USER=peertube
POSTGRES_PASSWORD=peertube

Postgres database name « peertube »

POSTGRES_DB=peertube

The database name used by PeerTube will be PEERTUBE_DB_NAME (only if set) OR ‹ peertube ›+PEERTUBE_DB_SUFFIX

#PEERTUBE_DB_NAME=
#PEERTUBE_DB_SUFFIX=_prod

Database username and password used by PeerTube must match Postgres’, so they are copied:

PEERTUBE_DB_USERNAME=peertube
PEERTUBE_DB_PASSWORD=peertube
PEERTUBE_DB_SSL=false

Default to Postgres service name « postgres » in docker-compose.yml

PEERTUBE_DB_HOSTNAME=postgres

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=***.ru

If you just want to test PeerTube on local

#PEERTUBE_WEBSERVER_PORT=9000
#PEERTUBE_WEBSERVER_HTTPS=false

If you need more than one IP as trust_proxy

pass them as a comma separated array:

PEERTUBE_TRUST_PROXY=[« 127.0.0.1 », « loopback », « 172.18.0.0/16 »]

Generate one using openssl rand -hex 32

PEERTUBE_SECRET=lowebowe

E-mail configuration

If you use a Custom SMTP server

#PEERTUBE_SMTP_USERNAME=
#PEERTUBE_SMTP_PASSWORD=

Default to Postfix service name « postfix » in docker-compose.yml

May be the hostname of your Custom SMTP server

PEERTUBE_SMTP_HOSTNAME=postfix
PEERTUBE_SMTP_PORT=25
PEERTUBE_SMTP_FROM=noreply@***.ru
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL=noir81@bk.ru

Postfix service configuration

POSTFIX_myhostname=***.ru

If you need to generate a list of sub/DOMAIN keys

pass them as a whitespace separated string =

OPENDKIM_DOMAINS=***.ru=peertube

see Add OPENDKIM env config support by wader · Pull Request #18 · wader/postfix-relay · GitHub

OPENDKIM_RequireSafeKeys=no

/!\ 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