Installation
๐ Start Answerโ
There are multiple ways to start Answer, you can choose the one that suits you best.
- Docker Compose
- Docker
- Binary
We recommend using Docker Compose to run Answer. This is the easiest way to get started with Answer.
If you are using Docker Desktop on Windows or Mac, docker-compose is already included. If you are using Linux, you will need to install docker-compose separately.
curl -fsSL https://raw.githubusercontent.com/answerdev/answer/main/docker-compose.yaml | docker compose -p answer -f - up
The default port for Answer is 9080
. You can access it at http://localhost:9080.
You can find all the available Docker images on Docker Hub. The latest
tag refers to the latest stable version of Answer.
docker run -d -p 9080:80 -v answer-data:/data --name answer answerdev/answer:latest
After running the command, heading to http://localhost:9080/install to continue installation.
If you can't access the installation page, you can use the command docker logs answer
to view the logs. It may help you find the specific problem.
As a golang project, Answer can be compiled into a binary file. You can download the binary file that matches your operating system from the release page.
INSTALL_PORT=80 ./answer init -C ./answer-data/
After running the command, heading to http://localhost:80/install to continue installation.
Follow the Install Steps to complete the installation. After that run the following command to start the answer again.
./answer run -C ./answer-data/
You can specify the port on which to start the installation by specifying the environment variable INSTALL_PORT
, default is 80.
We use -C
flag to indicate the directory where saved answer data.
Install Stepsโ
After you start the answer, you can follow the steps below to complete the initialization about the basic configuration.
Step 1: Choose the languageโ
Step 2: Config databaseโ
Answer supports MySQL, PostgreSQL, and SQLite as the database backend. The smallest environment is SQLite, which does not require any additional configuration. If you want to use MySQL or PostgreSQL, you need to setup the database first and then configure the database connection in this step. Here we recommend using sqlite3 to complete your first experience.
Step 3: Create configuration fileโ
Click Next button to create the configuration file.
Step 4: Fill in basic informationโ
Site URL is the browser address you will use to access answers after installation.
Don't forget the admin Email and password.
Step 5: Completeโ
๐Congratulations, you can click the done button to start your answer journey!