极空间通过ssh+Docker compose+ Nginx Proxy Manager (own network)
date
Nov 2, 2024
slug
newservice-zspace-docker-npm-nginx-proxy-manager
status
Published
summary
新服务 Nginx Proxy Manager 极空间
tags
service
type
Post
URL
Summary步骤开启ssh找到docker目录 - /data_n001/data/udata/real/phone-num123/DockerSSD安装 npm_nginx_proxy_manager修改密码 - 访问 http://ip:42081配置转发设置npm的https访问验证
Summary
步骤
开启ssh
找到docker目录 - /data_n001/data/udata/real/phone-num123/DockerSSD
/data_n001/data/udata/real/phone-num123/DockerSSD
安装 npm_nginx_proxy_manager
export DOCKER_PROJ=npm_nginx_proxy_manager
mkdir -p $DOCKER_PROJ; cd $DOCKER_PROJ
docker network create $DOCKER_PROJ-network && docker inspect $DOCKER_PROJ-network
cat > docker-compose.yml <<EOF
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
container_name: $DOCKER_PROJ
restart: unless-stopped
# if you wanna expose all ports to be managed by npm
#network_mode: host
ports:
# These ports are in format <host-port>:<container-port>
- '2095:80' # Public HTTP Port
- '2096:443' # Public HTTPS Port
- '42081:81' # Admin Web Port (forward to port npm_nginx_proxy_manager:81 for successful https reverse proxy)
# Add any other Stream port you want to expose
# - '21:21' # FTP
# Uncomment the next line if you uncomment anything in the section
# environment:
# Uncomment this if you want to change the location of
# the SQLite DB file within the container
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
default:
name: $DOCKER_PROJ-network
external: true
EOF
# docker-compose up
docker compose down; docker compose up -d; sleep 1s; docker compose logs -f
# 访问 http://ip:18081
# Email: admin@example.com
# Password: changeme
# upgrade
docker-compose pull
docker-compose up -d
修改密码 - 访问 http://ip:42081
配置转发
- cloudflare确定cname *.wxxx.com ⇒ xxx.synology.me or sh-ddclient.xxx.com , 打开小云朵
- 把wxxx.com 的cloudflare 基于源服务器ssl的key/certificate 上传