0 Unstar Star 2 Fork 0

avino-plan / postarGoMIT

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
一个简单易用且低耦合的邮件服务,可以为您的应用程序提供邮件功能 - An easy-to-use and low-coupling email service, which can provide email functions for your applications spread retract

Clone or download
docker_installation_manual.md 1.77 KB
Copy Edit Web IDE Raw Blame History
水不要鱼 authored 2020-07-27 00:50 . gRPC 集成完成

Docker Installation Manual

1. Pull an image, such as version v0.1.2-alpha.

$ docker pull fishgoddess/postar:v0.1.2-alpha

2. Run this image by two ways.

  • By docker

Before running this image, you should prepare a config file named "postar.ini", and put it to where you execute this command.

A typical config file will be like this:

host = smtp.your-smtp-host.com
port = 587
username = your-smtp-username@your-smtp-server.com
password = your-smtp-password

You should replace the information of yours.

Then, it's ok! Try to run by this command, and you will see a welcome interface:

$ docker run --name postar -p 5779:5779 -v /root/postar/postar.ini:/opt/postar-v0.1.2-alpha/postar.ini -d fishgoddess/postar:v0.1.2-alpha

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

The work directory is "/opt/postar-v0.1.2-alpha/".

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, you should prepare a file named "docker-compose.yaml".

A typical docker-compose file will be like this:

version: "3.1"

    image: fishgoddess/postar:v0.1.2-alpha
      - "5779:5779"
      # - "5780:5780"
      - ./logs:/opt/postar-v0.1.2-alpha/logs
      - ./logs/error:/opt/postar-v0.1.2-alpha/logs/error
      - ./postar.ini:/opt/postar-v0.1.2-alpha/postar.ini

Notice that we map directory "logs" in the container to local directory "logs".

So, you can read these logs conveniently.

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

$ docker-compose up -d

3. Enjoy it!

Comment ( 0 )

Sign in for post a comment