nodemailer / wildduck-webmail

Demo webmail service for WildDuck Mail Server
https://wildduck.email/
Other
147 stars 44 forks source link

Webmail doesn't start by docker-compose #57

Closed alternativshik closed 1 year ago

alternativshik commented 1 year ago

I'm trying to deploy by https://github.com/nodemailer/wildduck-dockerized and have this issue

wildduck-webmail_1 | info Express WWW server listening on port 3000 wildduck-webmail_1 | /app/node_modules/ioredis/built/Command.js:43 wildduck-webmail_1 | this.args = args.flat(); wildduck-webmail_1 | ^ wildduck-webmail_1 | wildduck-webmail_1 | TypeError: args.flat is not a function wildduck-webmail_1 | at new Command (/app/node_modules/ioredis/built/Command.js:43:26) wildduck-webmail_1 | at EventEmitter.select (/app/node_modules/ioredis/built/utils/Commander.js:92:13) wildduck-webmail_1 | at Socket. (/app/node_modules/ioredis/built/redis/event_handler.js:40:18) wildduck-webmail_1 | at Object.onceWrapper (events.js:286:20) wildduck-webmail_1 | at Socket.emit (events.js:203:15) wildduck-webmail_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:10) root_wildduck-webmail_1 exited with code 1

sihruabby commented 1 year ago

Same issue here. Read official instructions many times, but still cannot solve it.

Anyman552 commented 1 year ago

Same issue here. The problem could be caused by an outdated Node version. Alpine 3.9 uses Node 10, where the problem seems to occur.

Lauri-L commented 1 year ago

Seems to be so. I built the wildduck-webmail container locally, bumping the versions in Dockerfile to alpine:3.18 and python3 and got it at least running. Don't know if it breaks anything else though.

dmascord commented 1 year ago

As per Lauri-L, I reached the same conclusion:

diff --git a/Dockerfile b/Dockerfile
index 0d87511..99e60c2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
 # ---
-from alpine:3.9 as builder
+from alpine:3.18 as builder

 ARG UID=1000
 ENV APP_PATH /app
@@ -10,13 +10,13 @@ RUN chown -R builder .

 RUN apk add --no-cache nodejs
 RUN apk add --no-cache openssl
-RUN apk add --no-cache --virtual build-deps git python npm make g++
+RUN apk add --no-cache --virtual build-deps git python3 npm make g++

 USER builder
 RUN npm install && npm run bowerdeps

 # ---
-from alpine:3.9 as app
+from alpine:3.18 as app
 RUN apk add --no-cache nodejs
 ENV APP_PATH /app
 WORKDIR ${APP_PATH}

and in the docker-compose.yml:

  wildduck-webmail:
    #image: nodemailer/wildduck-webmail:latest
    build:
      context: ./wildduck-webmail/
      dockerfile: Dockerfile
bramhoven commented 1 year ago

I created a PR for the changes mentioned by @Lauri-L and @dmascord. Hopefully it will get the docker image back up and running!

laurivosandi commented 1 year ago

Looks like this issue is closed for now