jsuto / piler-examples

GNU General Public License v3.0
16 stars 1 forks source link

Issues installing on docker #1

Closed PaulMcF1987 closed 2 years ago

PaulMcF1987 commented 2 years ago

I am trying to add MailPiler to Docker but having some issues with the Yaml File

ERROR: The Compose file './docker-compose.yaml' is invalid because:
Unsupported config option for services.piler: 'init'
services.piler.healthcheck value Additional properties are not allowed ('start_period' was unexpected)
jsuto commented 2 years ago

What docker-compose version do you use?

PaulMcF1987 commented 2 years ago

@jsuto Docker version - 20.10.17 Compose version - 1.26.2

I noticed that on the docker repositary, there are 2 images piler and piler-ee Do they both do the same thing?

jsuto commented 2 years ago

Odd. The "init" option seems to be a valid directive: https://docs.docker.com/compose/compose-file/#init Can you try with 1.29.x version of docker-compose as well?

PaulMcF1987 commented 2 years ago

@jsuto I have upgraded and thinstall worked, however, now I am getting an error

ERROR: for mailpiler_piler_1  Cannot start service piler: driver failed programming external connectivity on endpoint mailpiler_piler_1 (2c8c0e0c8b8cd0f322b60700ba5e9cb8c3d5129c9026e1edfabb1f0fc7b96796): Error starting userland proxy: listen tcp4 0.0.0.0:25: bind: address already in use

ERROR: for piler  Cannot start service piler: driver failed programming external connectivity on endpoint mailpiler_piler_1 (2c8c0e0c8b8cd0f322b60700ba5e9cb8c3d5129c9026e1edfabb1f0fc7b96796): Error starting userland proxy: listen tcp4 0.0.0.0:25: bind: address already in use

ERROR: Encountered errors while bringing up the project.

Port 25 is the SMTP port, can I bind this without interfering with outgoing emails?

jsuto commented 2 years ago

Piler listens on port 25 by default, since it's an smtp server as well. You may use a different external port, eg. 2525 and forward it to port 25 inside the container. The example docker compose file doesn't cover this scenario, feel free to customise it.

PaulMcF1987 commented 2 years ago

Looks like I am nearly there.

Piler state is Exit 1

when I checked the logs it says

+ error 'No /etc/piler/piler.lic file, aborting'
+ echo ERROR: 'No /etc/piler/piler.lic file, aborting'
ERROR: No /etc/piler/piler.lic file, aborting  
+ exit 1

Which I am assuming is related to - ./piler.lic:/etc/piler/piler.lic:ro from the YAML

jsuto commented 2 years ago

You are right. You seem to deployed the enterprise edition of piler, which requires a license file. To obtain one, please visit https://mailpiler.com/free-trial/

PaulMcF1987 commented 2 years ago

Is there a docker YAML file for the non-enterprise version?

jsuto commented 2 years ago

Fix the image name to sutoj/piler:1.3.12, and remove the piler.lic volume reference in docker-compose.yaml.

PaulMcF1987 commented 2 years ago

Thanks @jsuto Should I be able to access a GUI at port 2525? (Port has been opened via firewall)

When i visit ip:2525 I get This page isn’t working "IP" sent an invalid response. ERR_INVALID_HTTP_RESPONSE

jsuto commented 2 years ago

We have agreed above that 2525 is the smtp port. So no, you should not try accessing the gui there. Also check the traefik container logs to find out what's wrong.

PaulMcF1987 commented 2 years ago

The Traefek issue is sorted, I had change something by accident in the Traefik.yaml

How do I access the GUI? I cant see any details regarding this on the documentation

jsuto commented 2 years ago

https://<your hostname>

PaulMcF1987 commented 2 years ago

There is no host name, I am using an old server to test the app, all I have is an IP address

jsuto commented 2 years ago

Then you need to get rid of traefik, and add "80:80" port mapping to the piler container.

PaulMcF1987 commented 2 years ago

@jsuto thatnk for your help. Think Im going to call it quits and look for something different. Im struggling to access the GUI and the documentation doesnt give much info that I can see

jsuto commented 2 years ago

I'm sorry to hear that.