Answer Docker Deployment
Knowledge-based community

1. Background
An open-source knowledge-based community software. You can use it to quickly build your Q&A community for product technical support, customer support, user communication, and more.
Github Repo: Answer
2. Answer Deployment and Configuration
- Prerequisite
apt -y update
apt -y install curl nginx python3-certbot-nginx
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
- Create docker-compose.yml
mkdir answer
cd answer
nano docker-compose.yml
version: '3.8'
services:
answer:
image: answerdev/answer
restart: unless-stopped
ports:
- "127.0.0.1:33333:80" # You can customize your localhost port
volumes:
- ./answer-data:/data
- Bring up the container
docker compose up -d
3. Nginx Configuration
nano /etc/nginx/sites-available/answer
server {
listen 80;
server_name answer.example.com;
client_max_body_size 0;
location / {
proxy_pass http://127.0.0.1:33333;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
- Enable new Nginx config
ln -s /etc/nginx/sites-available/answer /etc/nginx/sites-enabled/answer
- Issue SSL cert
certbot –nginx
Copyright statement: Unless otherwise stated, all articles on this blog adopt the CC BY-NC-SA 4.0 license agreement. For non-commercial reprints and citations, please indicate the author: Henry, and original article URL. For commercial reprints, please contact the author for authorization.