apache / apache/answer

got HTTP Error 50X page when rerun with postgresql only

Open
#1,461 12 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
15.7k
Forks
1.4k
Avg merge
3d 8h
Merged PRs (30d)
7

Description

## Describe the bug

got HTTP Error 50X page when rerun with postgresql only

## To Reproduce

### 1. deploy with docker compose
```yaml
services:
answer:
image: apache/answer:1.7.0
environment:
AUTO_INSTALL: 'true'
DB_TYPE: postgres
DB_HOST: 172.17.0.1:5432
DB_USERNAME: answer
DB_PASSWORD: answer_pwd_pg
DB_NAME: answer
ADMIN_EMAIL: admin@example.com
ADMIN_NAME: admin
ADMIN_PASSWORD: 123456
CONTACT_EMAIL: admin@example.com
LANGUAGE: zh_CN
SITE_NAME: Answer
SITE_URL: https://answer.example.com
EXTERNAL_CONTENT_DISPLAY: 'always_display'
LOG_LEVEL: debug

#volumes:
# - /root/apps/answer/uploads:/data/uploads
```

### 2. rerun got 50x

stop docker compose and rerun docker compose, got HTTP Error 50X page

### 3. the log

I cannot found error log

```log
2025-12-15 16:36:26.421 DEBUG translator/provider.go:71 try to read file: zh_TW.yaml
[auto-install] try to install by environment variable
[config-file] try to create at /data/conf/config.yaml
[config-file] create directory success, config file is /data/conf/config.yaml
[config-file] install success
2025-12-15 16:36:26.476 WARN install/install_controller.go:226 database is already initialized
[SUCCESS] answer installation service will run at: http://localhost:80/install/
2025-12-15 16:36:52.497 DEBUG install/install_server.go:45 open static path build/static/js/3926.ad240c86.chunk.js
2025-12-15 16:36:52.497 DEBUG install/install_server.go:45 open static path build/static/js/3926.ad240c86.chunk.js
```

## Expected behavior

can use

## Screenshots

Image

## Platform

- Device: Desktop
- OS: macOS
- Browser and version: Chrome
- Version: v1.7.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the rerun with the provided Docker Compose configuration and inspect the logs around install/install_controller.go and install/install_server.go, including the static asset path shown in the report. Determine why an already-initialized PostgreSQL installation serves a 50X page, and confirm that rerunning the same deployment succeeds with a useful error if it fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, go, postgresql
Domain
backend, databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.