我正在尝试使用 Docker 映像 mediawiki:1.40.0-fpm 安装 MediaWiki。我打算使用 Nginx 的外部实例作为 SSL 终止的反向代理。
我可以成功启动容器,但是当我尝试按照文档使用 curl 进行连接时http://127.0.0.1:8081 我得到;curl:(56)接收失败:对等方重置连接
我的 docker-compose.yml 看起来像这样;
services:
mediawiki:
container_name: mediawiki
image: mediawiki:1.40.0-fpm
restart: always
ports:
- "127.0.0.1:8081:80"
volumes:
- ./images:/var/www/html/images
# After initial setup, download LocalSettings.php to the same directory as
# this yaml and uncomment the following line and use compose to restart
# the mediawiki service
# - ./LocalSettings.php:/var/www/html/LocalSettings.php
environment:
MEDIAWIKI_SITE_SERVER: https://wiki.my.domain
MEDIAWIKI_SITE_NAME: My Wiki
# you need to specify the reference to the database, Docker no longer
# shares environmental variables between linked containers
MEDIAWIKI_DB_TYPE: mysql # 'mysql' or 'postgres'
MEDIAWIKI_DB_HOST: db
MEDIAWIKI_DB_USER: mediawiki
MEDIAWIKI_DB_PASSWORD: YcBUxyP6tdKfyDEY
MEDIAWIKI_DB_NAME: mediawiki
# uncomment 'MEDIAWIKI_ENABLE_SSL' to enable SSL support
# MEDIAWIKI_ENABLE_SSL: true
networks:
- mynetwork
networks:
mynetwork:
name: mynetwork
external: true
有任何想法吗?