mirror of https://gitee.com/answerdev/answer.git
Correct various text and formatting issues
This commit is contained in:
parent
8d6bbbebd3
commit
92d9c1ffc6
52
INSTALL.md
52
INSTALL.md
|
@ -6,9 +6,9 @@ Before installing Answer, you need to install the base environment first.
|
|||
|
||||
You can then install Answer in several ways:
|
||||
|
||||
- Deploy with Docker
|
||||
- binary installation
|
||||
- Source installation
|
||||
- [Deploy with Docker](#Docker-compose-for-Answer)
|
||||
- [Binary installation](#Install-Answer-using-binary)
|
||||
- [Source installation](#Compile-the-image)
|
||||
|
||||
## Docker-compose for Answer
|
||||
```bash
|
||||
|
@ -17,15 +17,15 @@ $ wget https://raw.githubusercontent.com/answerdev/answer/main/docker-compose.ya
|
|||
$ docker-compose up
|
||||
```
|
||||
|
||||
browser open URL [http://127.0.0.1:9080/](http://127.0.0.1:9080/).
|
||||
In browser, open URL [http://127.0.0.1:9080/](http://127.0.0.1:9080/).
|
||||
|
||||
You can log in with the default administrator username( **`admin@admin.com`** ) and password( **`admin`** ).
|
||||
You can log in with the default administrator username (**`admin@admin.com`**) and password (**`admin`**).
|
||||
|
||||
## Docker for Answer
|
||||
Visit Docker Hub or GitHub Container registry to see all available images and tags.
|
||||
Visit [Docker Hub](https://hub.docker.com/r/answerdev/answer) or GitHub Container registry to see all available images and tags.
|
||||
|
||||
### Usage
|
||||
To keep your data out of Docker container, we do a volume (/var/data -> /data) here, and you can change it based on your situation.
|
||||
To persist data beyond the life of a Docker container, use a volume (/var/data -> /data). You can modify this based on your situation.
|
||||
|
||||
```
|
||||
# Pull image from Docker Hub.
|
||||
|
@ -37,7 +37,7 @@ $ mkdir -p /var/data
|
|||
# Run the image first
|
||||
$ docker run --name=answer -p 9080:80 -v /var/data:/data answerdev/answer
|
||||
|
||||
# After the first startup, a configuration file will be generated in the /var/data directory
|
||||
# After successful first startup, a configuration file will be generated in the /var/data directory
|
||||
# /var/data/conf/config.yaml
|
||||
# Need to modify the Mysql database address in the configuration file
|
||||
vim /var/data/conf/config.yaml
|
||||
|
@ -46,34 +46,32 @@ vim /var/data/conf/config.yaml
|
|||
# connection: [username]:[password]@tcp([host]:[port])/[DbName]
|
||||
...
|
||||
|
||||
# After configuring the configuration file, you can start the mirror again to start the service
|
||||
# After configuring the configuration file, you can start the container again to start the service
|
||||
$ docker start answer
|
||||
```
|
||||
|
||||
## Binary for Answer
|
||||
## Install Answer using binary
|
||||
|
||||
1. Unzip the compressed package
|
||||
2. Use the command cd to enter the directory you just created
|
||||
3. Execute the command ./answer init
|
||||
4. Answer will generate a ./data directory in the current directory
|
||||
5. Enter the data directory and modify the config.yaml file
|
||||
6. Modify the database connection address to your database connection address
|
||||
|
||||
connection: [username]:[password]@tcp([host]:[port])/[DbName]
|
||||
7. Exit the data directory and execute ./answer run -c ./data/conf/config.yaml
|
||||
2. Use the command `cd` to enter the directory you just created
|
||||
3. Execute the command `./answer init`
|
||||
4. Answer will generate a `./data` directory in the current directory
|
||||
5. Enter the `data` directory and modify the `config.yaml` file
|
||||
6. Modify the database connection identify your database connection information
|
||||
`connection: [username]:[password]@tcp([host]:[port])/[DbName]`
|
||||
7. Use `cd ..` to return the directory from step 2, and execute `./answer run -c ./data/conf/config.yaml`
|
||||
|
||||
## Available Commands
|
||||
Usage: answer [command]
|
||||
Usage: `answer [command]`
|
||||
|
||||
- help: Help about any command
|
||||
- init: Init answer application
|
||||
- run: Run answer application
|
||||
- check: Check answer required environment
|
||||
- dump: Backup answer data
|
||||
- `help`: Help about any command
|
||||
- `init`: Init answer application
|
||||
- `run`: Run answer application
|
||||
- `check`: Check answer required environment
|
||||
- `dump`: Backup answer data
|
||||
|
||||
## config.yaml Description
|
||||
|
||||
Here is a sample/default config.yaml file, as would be created from `answer init`.
|
||||
```
|
||||
server:
|
||||
http:
|
||||
|
@ -97,9 +95,9 @@ service_config:
|
|||
```
|
||||
|
||||
## Compile the image
|
||||
If you have modified the source files and want to repackage the image, you can use the following statement to repackage the image
|
||||
If you have modified the source files and want to repackage the image, you can use the following to repackage the image
|
||||
```
|
||||
docker build -t answer:v1.0.0 .
|
||||
```
|
||||
## common problem
|
||||
1. The project cannot be started, answer the main program startup depends on the configuration file config.yaml, the internationalization translation directory/i18n, the upload file storage directory/upfiles, you need to ensure that the configuration file is loaded when the project starts, answer run -c config.yaml and the correct config.yaml The configuration items that specify the i18n and upfiles directories
|
||||
1. The project cannot be started: the main program startup depends on proper configuraiton of the configuration file, `config.yaml`, as well as the internationalization translation directory (`i18n`), and the upload file storage directory (`upfiles`). Ensure that the configuration file is loaded when the project starts, such as when using `answer run -c config.yaml` and that the `config.yaml` correctly specifies the i18n and upfiles directories.
|
||||
|
|
Loading…
Reference in New Issue