ArtiPub (short for Article Publisher, meaning “Article Publisher “) is an open source Article publishing platform that can help Article authors automatically publish their written articles to nuggets, SegmentFault, CSDN, Zhihu, open Source China and other technology media platforms to spread quality knowledge. Get maximum exposure.

The official team offers three installation options

[Docker](# install with Docker) (approx. 5 minutes): Suitable for developers who have a basic knowledge of Docker

[NPM](# installed via the NPM package) (approximately 3 minutes): Suitable for developers familiar with Node.js or NPM

[source](# install from source) (approximately 5-10 minutes): for developers who want to understand kernel principles

I use the first method

Since I stepped on a few holes in the installation process, write this down as a reminder

Install the Docker

Curl - fsSL https://get.docker.com | bash # if is the domestic machine can choose to use ali cloud image, Speed up the installation curl - fsSL https://get.docker.com | docker bash - s - mirror AliyunCopy the code

Common commands

Start the Docker

systemctl start docker

Set auto-start upon startup

systemctl enable docker

View local images

docker images

Install the Docker Compose

Sudo curl - L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname - s) - $(uname -m)" - o /usr/local/bin/docker-composeCopy the code
Run the following command to grant permission:
sudo chmod +x /usr/local/bin/docker-compose
Copy the code
Verify that Docker Compose is installed successfully:

docker-compose -v

If docker-compose version 1.25.4 and build 8d51620a are displayed, the installation is successful.

Here is the official tutorial

Docker eliminates the process of installing MongoDB and is our most recommended installation. Before installing ArtiPub with Docker, make sure you install Docker and Docker Compose. Docker runs ArtiPub in two ways.

Start with docker-compose. Yaml that applies to your local before running the mongodb container. Create a docker-compose. Yaml file in your project directory and enter the following.

Version: "3.3" services: app: image: "tanliyuan123 / artipub: 1.2.0" environment: MONGO_HOST: "mongo" # MONGO_USERNAME: root # MONGO_PASSWORD: example ARTIPUB_API_ADDRESS: "http://localhost:3000" # Back-end API address, if the installation address is not on the localhost, please change it to protocol + server IP address + port number (default :3000) ports: - "8000:8000" # frontend - "3000:3000" # backend depends_on: - mongo mongo: image: mongo:latest restart: always #volumes: # - "E:\\mongodb:/data/db" ports: - "27017:27017"Copy the code

Then enter the following command on the command line. If you want to start the container again without destroying the contents of the last time, uncomment the volumes line and change it to your local path.

docker-compose up

Then type http://localhost:8000 in your browser to see the interface.

Note ⚠️, if your Docker host is not native, for example you are using a Docker Machine or Docker service on another Machine, you need to change the environment variable ARTIPUB_API_ADDRESS to host IP + port number (default 3000). Then, enter http://< host IP>:8000 in your browser to see the interface.

The last

When installed on the server, you should remember to open the port, or you can not access the service

Attached is the official team’s Github address

In Programming Perl (published by O’Reilly), Larry Wall states that “laziness, arrogance, and impatience” are the three great virtues of a programmer: laziness, because you’re trying to reduce the amount of work you need to do; Impatience because you get furious when they ask you to waste time doing things that computers should be doing. And arrogance, because you get carried away by your pride and you write your program so that no one can find fault with it.

Isn’t the role of ArtiPub to make us lazy? And this article was written and published using ArtiPub