Problème de mail à l'installation dans docker

Bonjour,
j’essaye pour la première fois d’installer peertube dans docker et lors du démarrage du conteneur j’ai cette erreur :

[video.fredix.xyz:9000] 2024-09-18 06:53:34.399 info: Using following configuration file hierarchy: /app/config/default.yaml -> /app/support/docker/production/config/production.yaml -> /app/support/docker/production/config/custom-environment-variables.yaml.
[video.fredix.xyz:9000] 2024-09-18 06:53:34.403 warn: SMTP is not configured so the contact form will not work.
[video.fredix.xyz:9000] 2024-09-18 06:53:34.405 warn: Directory of original_video_files should not be in the production directory of PeerTube. Please check your production configuration file.
[video.fredix.xyz:9000] 2024-09-18 06:53:35.133 info: Database peertube is ready.
[video.fredix.xyz:9000] 2024-09-18 06:54:02.846 info: Creating application account.
[video.fredix.xyz:9000] 2024-09-18 06:54:02.861 info: Creating a default OAuth Client.
[video.fredix.xyz:9000] 2024-09-18 06:54:02.876 info: Creating the administrator.
[video.fredix.xyz:9000] 2024-09-18 06:54:02.906 error: Cannot install application. {
  "err": {
    "stack": "SequelizeValidationError: notNull Violation: UserModel.email cannot be null\n    at InstanceValidator._validate (/app/node_modules/sequelize/lib/instance-validator.js:50:13)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async InstanceValidator._validateAndRunHooks (/app/node_modules/sequelize/lib/instance-validator.js:60:7)\n    at async InstanceValidator.validate (/app/node_modules/sequelize/lib/instance-validator.js:54:12)\n    at async UserModel.save (/app/node_modules/sequelize/lib/model.js:2426:7)\n    at async file:///app/dist/core/lib/user.js:42:29\n    at async /app/node_modules/sequelize/lib/sequelize.js:507:18\n    at async createUserAccountAndChannelAndPlaylist (file:///app/dist/core/lib/user.js:37:45)\n    at async createOAuthAdminIfNotExist (file:///app/dist/core/initializers/installer.js:131:5)\n    at async Promise.all (index 2)\n    at async Promise.all (index 0)\n    at async installApplication (file:///app/dist/core/initializers/installer.js:20:9)\n    at async startApplication (file:///app/dist/server.js:197:5)",
    "message": "notNull Violation: UserModel.email cannot be null",

Bonjour,

Vous pouvez montrer votre .env et votre docker compose ?

Alors je n’utilise pas de compose mais Nomad, tout est dans ce fichier hcl. Je comprend que ca peut être particulier mais je n’ai aucun soucis avec d’autres applications.

job "peertube" {
  datacenters = ["dc1"]
  type = "service" 
  group "home" {
     count = 1

     network {
     		mode = "bridge"
				port "http" {
				  to     = 9000 # container port the app runs on
				  host_network = "tailscale"
				}
	      	port "postgresql" {
    	    	to = 5432 # container port the app runs on
    	  	}				
			port "redis" {
			  to     = 6379 # container port the app runs on
			}
      }


     task "peertube" {
     		driver = "docker"

				constraint {
				 attribute = "${attr.unique.hostname}"
				 value     = "nuc"
				}

				env {
					PEERTUBE_WEBSERVER_HOSTNAME = "video.fredix.xyz"
					PEERTUBE_WEBSERVER_PORT = 9000
					PEERTUBE_WEBSERVER_HTTPS = false
					PEERTUBE_TRUST_PROXY = "['127.0.0.1', 'loopback', '100.86.86.100', '100.78.185.73']"
					PEERTUBE_SECRET =	"SECRET"
					PEERTUBE_DB_USERNAME = "peertube"
					PEERTUBE_DB_PASSWORD = "PASS"
					PEERTUBE_DB_HOSTNAME = "127.0.0.1"								
				}

				config {
					image = "chocobozzz/peertube:production-bookworm"
					volumes = [
					 "/data/volumes/peertube/data:/data",
					 "/data/volumes/peertube/config:/config"					 
					]				

					 ports = [
					    "http"
					 ]
					}

					resources {
					 cpu = 1000
					 memory = 2048
					}

					service {
						 name = "peertube"
						 provider = "consul"
						 port = "http"

					   tags = ["allocport=${NOMAD_HOST_PORT_http}"]

						 check {
						    type = "http"
						    name = "app_health"
						    path = "/"
						    interval = "20s"
						    timeout = "10s"
						}
					}	

     	}


    task "postgresql" {
      driver = "docker"

      constraint {
        attribute = "${attr.unique.hostname}"
        value     = "nuc"
      }

      env {
        POSTGRES_USER = "peertube"
        POSTGRES_PASSWORD = "PASS"
        POSTGRES_DB = "peertube"
      }


      config {
        image = "postgres:13-alpine"

        mounts = [
          {
                type = "bind"
                target = "/var/lib/postgresql/data"
                source = "/data/volumes/peertube/postgresql"
                readonly = false
                bind_options = {
                  propagation = "rshared"
                }
            },
          {
                type = "bind"
                target = "/dump"
                source = "/data/volumes/peertube/dump"
                readonly = false
                bind_options = {
                  propagation = "rshared"
                }
            }
        ]

        ports = ["postgresql"]
      }

        resources {
          cpu = 1000
          memory = 1000
        }


        service {
          name = "peertube-postgresql"
          provider = "consul"
          port = "postgresql"

          tags = ["alloc=${NOMAD_ALLOC_ID}"]
        }

    }

     task "redis" {
     		driver = "docker"

				constraint {
				 attribute = "${attr.unique.hostname}"
				 value     = "nuc"
				}

				config {
						image = "redis:6-alpine"

						mounts = [
						  {
						        type = "bind"
						        target = "/data"
						        source = "/data/volumes/peertube/redis"
						        readonly = false
						        bind_options = {
						          propagation = "rshared"
						        }
						    }
						]

				   ports = [
				      "redis"
				   ]			   								
				}

				resources {
				   cpu = 400
				   memory = 254
				}

				service {
					name     = "peertube-redis"
					provider = "consul"
					port     = "redis"
				}      
     	}




  }
}

Je pense qu’il manque certaines variables d’environnement pour peertube, notamment PeerTube/support/docker/production/.env at develop · Chocobozzz/PeerTube · GitHub

Oups ! vraiment désolé ca fonctionne mieux maintenant, merci bien. Par contre j’ai des erreurs concernant Redis, je ne suis pas sur qu’il arrive à s’y connecter et je n’ai pas du de variable d’environnement comme pour postgresql pour lui donner le nom du serveur :


[video.fredix.xyz:9000] 2024-09-18 08:05:34.882 error: Error in job queue events activitypub-http-broadcast-parallel. {
  "err": {
    "stack": "Error: connect ETIMEDOUT\n    at Socket.<anonymous> (/app/node_modules/ioredis/built/Redis.js:170:41)\n    at Object.onceWrapper (node:events:631:28)\n    at Socket.emit (node:events:517:28)\n    at Socket._onTimeout (node:net:598:8)\n    at listOnTimeout (node:internal/timers:569:17)\n    at process.processTimers (node:internal/timers:512:7)",
    "message": "connect ETIMEDOUT",
    "errorno": "ETIMEDOUT",
    "code": "ETIMEDOUT",
    "syscall": "connect"
  }
}

Vous pouvez utiliser PEERTUBE_REDIS_HOSTNAME

(l’ensemble des variables sont disponibles dans PeerTube/support/docker/production/config/custom-environment-variables.yaml at develop · Chocobozzz/PeerTube · GitHub)

Parfait tout fonctionne, merci !