Sign inSign up

fishgoddess/postar

By fishgoddess

Updated almost 4 years ago

postar is an easy-to-use and low-coupling email service.

Image
1

324

fishgoddess/postar repository overview

✏ postar-docker

Update DockerHub Readme

Docker Hub:https://hub.docker.com/r/fishgoddess/postar

🔗 Postar is an easy-to-use and low-coupling email service, which can provide email functions for your applications.

码云:https://gitee.com/avino-plan/postar

码云:https://gitee.com/avino-plan/postar-docker

Github: https://github.com/avino-plan/postar

Github: https://github.com/avino-plan/postar-docker

📚 How to use
1. Pull an image.

Remember replacing ${VERSION} with an exact version.

$ docker pull fishgoddess/postar:${VERSION}
2. Run this image.
  • By Docker

Before running this image, you should prepare a config file named "postar.ini", and a typical config file will be like this:

[smtp]
# Specify your smtp server host.
host = "smtp.xxx.com"
# Specify your smtp server port.
# Default is 587.
port = 587
# Specify your smtp server user.
user = "[email protected]"
# Specify your smtp server password.
password = "xxx"

You should replace the information of yours.

Then, it's ok! Try to run by this command, and you will see some logs printed on screen:

Remember replacing ${VERSION} with an exact version.

$ docker run --name postar -p 5897:5897 -v /root/docker/postar/postar.ini:/postar/postar.ini fishgoddess/postar:${VERSION}

Remember "/root/docker/postar/postar.ini" is where your config file is.

The work directory in container is "/postar".

If you want to enter the container, try this:

$ docker exec -it postar sh

Notice that the based image we used is alpine, which doesn't have 'bash'.

So, you should use sh instead of bash.

  • By Docker-compose

First, a config file is needed too, just like mentioned above.

Second, you should prepare a file named "docker-compose.yml", and a typical docker-compose file will be like this:

Remember replacing ${VERSION} with an exact version.

version: "3.1"

services:
  postar:
    image: fishgoddess/postar:${VERSION}
    restart: always
    ports:
      - "5897:5897"
    volumes:
      - ./log:/postar/log
      - ./postar.ini:/postar/postar.ini

Notice that we map directory "log" in container to local directory "log".

So, you can read these logs conveniently.

Then, you can execute docker-compose command to run it:

$ docker-compose up -d
3. Enjoy it!

Tag summary

Content type

Image

Digest

sha256:7deb65f41

Size

16.4 MB

Last updated

almost 4 years ago

docker pull fishgoddess/postar:v0.3.2-alpha