9001 / 9001/copyparty

Document reverse proxy with Caddy

未关闭 适合新手
#38 5 条评论 2 个 reaction 已指派 1 人 已被 @9001 认领 在 GitHub 查看
enhancement
主要语言
Python
星标
46.7k
派生
1.9k
平均合并
9 天 2 小时
30 天内合并 PR
4

描述

Work in progress. Works fine for web browser with basic auth (I'm not yet comfortable running this without basic auth in place).

Problems with basic auth and android app https://github.com/9001/party-up/issues/3

docker-compose.yml

#
# docker-compose up
#

version: '3.3'

# based on:
# * https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04
# * https://arjunphp.com/windows-server-docker-compose-caddy-server-reverse-proxy/
# * https://github.com/lucaslorentz/caddy-docker-proxy - not actually used

services:
# reverse proxy server
# https://hub.docker.com/_/caddy
caddy:
image: caddy
restart: unless-stopped
hostname: caddy
networks:
- app_net
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/data:/data
# NOTE only Caddy should be using ports, all others shuld use expose instead
ports:
# NOTE 80 and 443 were needed to get cert. once had cert not needed - looks like http (80) was needed unclear about https (443)
- "80:80"
#- "443:443"
- "2000:2000"

# mkdir -p /home/pi/data/copyparty/cfg /home/pi/data/copyparty/w
# chmod a+rwx /home/pi/data/copyparty/cfg /home/pi/data/copyparty/w
copyparty:
# TODO? -u 1000
container_name: copyparty
image: copyparty/min
hostname: copyparty
restart: unless-stopped
expose:
- 3923
networks:
- app_net
volumes:
- "/home/pi/data/copyparty/cfg:/cfg"
- "/home/pi/data/copyparty/w:/w"

networks:
app_net:
external: false

Caddyfile

https://copyparty.YOUR.DOMAIN.HERE:2000 {
# basicauth works fine for web browsers with CopyParty
# it fails with Party-Up Android sharing app :-(
# not figured out passwords scheme properly yet to want to remove this
basicauth /* {
username hashed_password
}
reverse_proxy copyparty:3923
}

/home/pi/data/copyparty/cfg/config.conf

Disable https, so that reverse proxy certificate is used

[global]
http-only

贡献指南

打开贡献指南

调研方向

该 issue 提供了一个用于设置反向代理的 docker-compose.yml 和 Caddyfile 示例。首先了解 Caddy 如何作为反向代理工作,以及它如何与 copyparty 服务集成。查看仓库中现有的配置文件,了解文档存储在哪里。任务是清晰地记录这一设置,以便其他人能够照此操作。

由索引模型根据 Issue 内容生成。

评估

技术栈
docker, docker-compose
领域
devops, documentation
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。