commit dcd2b4c5fb50fac30baa6be627cf3dabd6fcc0d8 Author: doudou201703 <84085676+doudou201703@users.noreply.github.com> Date: Sun Aug 2 14:18:15 2026 +0800 six_docker_001 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b6b1ecf --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 已忽略包含查询文件的默认文件夹 +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml new file mode 100644 index 0000000..0980911 --- /dev/null +++ b/.idea/UniappTool.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..74c5a40 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,29 @@ + + + + + postgresql + true + org.postgresql.Driver + jdbc:postgresql://127.0.0.1:5433/six + + + + + + $ProjectFileDir$ + + + postgresql + true + org.postgresql.Driver + jdbc:postgresql://127.0.0.1:5435/six_demo + + + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/db-forest-config.xml b/.idea/db-forest-config.xml new file mode 100644 index 0000000..f624b97 --- /dev/null +++ b/.idea/db-forest-config.xml @@ -0,0 +1,10 @@ + + + + . + ---------------------------------------- + 1:0:64c52bf5-e6a7-4e2d-b382-c5f27ec834b4 + 2:0:f9d13c1b-f686-48ae-9fbe-9e596b4e0261 + . + + \ No newline at end of file diff --git a/.idea/dockerCompose.iml b/.idea/dockerCompose.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/dockerCompose.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..146ab09 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..93497cf --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/swift-toolchain.xml b/.idea/swift-toolchain.xml new file mode 100644 index 0000000..99df217 --- /dev/null +++ b/.idea/swift-toolchain.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/xiao.sh b/xiao.sh new file mode 100644 index 0000000..fa69c71 --- /dev/null +++ b/xiao.sh @@ -0,0 +1,9 @@ +#!/bin/zsh -e + + +# 关于变量的讲解 +export zizi_path="全局自定义变量的值" +dir_path="/Users/xiao/" +xiao_name="区别在这里了呢" +echo "${dir_path}适合拼接字符串${xiao_name}" +sh "/Users/xiao/IdeaProjects/dockerCompose/zizi.sh" \ No newline at end of file diff --git a/zizi.sh b/zizi.sh new file mode 100644 index 0000000..6bce5c8 --- /dev/null +++ b/zizi.sh @@ -0,0 +1,8 @@ +#!/bin/zsh + +# shellcheck disable=SC2154 +xiao="0123456789" +echo "${xiao:1,3}" +echo "从右边第star个开始截取指定长度${xiao: 0-5:4}" +echo "从右边开始直到最前面${xiao:0-2}" +echo "从 string 字符串左边第一次出现 *chars 的位置开始截取 *chars 右边的所有字符。${xiao#*4}" \ No newline at end of file diff --git a/云服务/Caddyfile b/云服务/Caddyfile new file mode 100644 index 0000000..5792d6e --- /dev/null +++ b/云服务/Caddyfile @@ -0,0 +1,9 @@ + + +gitea.sixgou.com { + # 1. 反向代理到 frps 的 HTTP 监听端口 (8080) + reverse_proxy django_gitea:3000 +} +xiao.sixgou.com { + reverse_proxy django_frps:8080 +} \ No newline at end of file diff --git a/云服务/giteaCompose.yaml b/云服务/giteaCompose.yaml new file mode 100644 index 0000000..2cf9ab5 --- /dev/null +++ b/云服务/giteaCompose.yaml @@ -0,0 +1,28 @@ +name: "xiao_gites" # 项目名称 +services: + django_gitea: + image: gitea/gitea:latest + container_name: django_gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__server__ROOT_URL=https://gitea.sixgou.com/ + restart: always + volumes: + - gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + networks: + - xiao_network + + + +# 声明命名卷 +volumes: + gitea: +networks: + xiao_network: + + + + \ No newline at end of file diff --git a/云服务/hudieCompose.yaml b/云服务/hudieCompose.yaml new file mode 100644 index 0000000..53ca1eb --- /dev/null +++ b/云服务/hudieCompose.yaml @@ -0,0 +1,104 @@ +#version: "3.7" +name: "xiao_hudie" # 项目名称 +services: + + django_redis: # redis镜像 + image: redis + container_name: django_redis + restart: unless-stopped + command: + - --requirepass "com792282" + volumes: + - redisData:/data + networks: + - xiao_network + django_postgres: # postgres镜像 + image: postgres + container_name: django_postgres + restart: unless-stopped + environment: + POSTGRES_USER: "xiaozizi" #配置的数据的用户名称 + POSTGRES_DB: "six" # 配置的是数据库的名称 + POSTGRES_PASSWORD: "com792282" # 配置的数据的密码 + POSTGRESQL_TIMEZONE: "Asia/Shanghai" # 配置的数据库的时间 + volumes: + - django_six_postgres:/var/lib/postgresql # 配置的数据卷 + networks: + - xiao_network # 配置的网络 + + + + django_frps: + image: snowdreamtech/frps + container_name: xiao_frps + restart: unless-stopped + # ports: + # - "7000:7000/tcp" # frpc 控制 + # - "7000:7000/udp" # 如果要 KCP + # - "7002:7002/udp" # QUIC + # - "8080:8080/tcp" # vhostHTTPPort,给 Caddy 反代用 + # - "7500:7500/tcp" # dashboard,也可让 Caddy 反代后不 export + volumes: + - /home/ubuntu/sixfrps.toml:/etc/frp/frps.toml + environment: + - FRP_CONFIG_FILE=/etc/frp/frps.toml + networks: + - xiao_network + + + + django_caddy: + image: caddy + container_name: django_caddy + volumes: + - /home/ubuntu/Caddyfile:/etc/caddy/Caddyfile + ports: + - "80:80" + - "443:443" # HTTPS 端口 + - "443:443/udp" # HTTP/3 支持 (可选,提升性能) + networks: + - xiao_network + + + + django_gitea: + image: gitea/gitea:latest + container_name: django_gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__server__ROOT_URL=https://gitea.sixgou.com/ + restart: always + volumes: + - gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + networks: + - xiao_network + + + + + django_web: + image: python:3.13 + container_name: django_web + restart: always + stdin_open: true + volumes: + - /home/ubuntu/demoDjango:/demoDjango + - /home/ubuntu/sixGuoDjango:/sixGuoDjango + networks: + - xiao_network + environment: + - LANG=C.UTF-8 + - LC_ALL=C.UTF-8 +networks: + xiao_network: +# 添加一句注释看看能不能自动上传的 +volumes: + redisData: + postgresData: + caddyData: + django_six_postgres: + django_six_demo_data: + gitea: \ No newline at end of file diff --git a/云服务/sixfrps.toml b/云服务/sixfrps.toml new file mode 100644 index 0000000..f08b6f3 --- /dev/null +++ b/云服务/sixfrps.toml @@ -0,0 +1,32 @@ +#bindPort = 7000 +# +#vhostHTTPSPort = 443 +#vhostHTTPPort = 80 +# +#auth.method = "token" +#auth.token = "sixsixgousite" +# +# ===== 监听 ===== +bindAddr = "0.0.0.0" +bindPort = 7000 # frpc 连这台服的端口 +kcpBindPort = 7000 # 可选,KCP 同端口 +quicBindPort = 7002 # 可选,QUIC + +# ===== HTTP/HTTPS 穿透收口(交给 Caddy 再反代)===== +vhostHTTPPort = 8080 # ⚠️ 别设 80,留给 Caddy +vhostHTTPSPort = 0 # 让 Caddy 管 HTTPS,这里关掉 + +# ===== 鉴权 ===== +auth.method = "token" +auth.token = "sixsixgousite" + +# ===== Dashboard ===== +webServer.addr = "0.0.0.0" +webServer.port = 7500 +webServer.user = "admin" +webServer.password = "CHANGE_ME_DASHBOARD_PWD" + +# ===== 日志 ===== +log.to = "/tmp/frps.log" +log.level = "info" +log.maxDays = 3 \ No newline at end of file diff --git a/本地服务/macCompose.yaml b/本地服务/macCompose.yaml new file mode 100644 index 0000000..2a20256 --- /dev/null +++ b/本地服务/macCompose.yaml @@ -0,0 +1,73 @@ +#version: "3.7" +name: "xiao_demo" # 项目名称 +services: + + mac_redis: # redis镜像 + image: redis + container_name: mac_redis + restart: unless-stopped + ports: + - "6379:6379" + command: + - --requirepass "com792282" + volumes: + - redisData:/data + networks: + - xiao_network + + mac_sixfrpc: + image: snowdreamtech/frpc + container_name: mac_sixfrpc + restart: unless-stopped + volumes: + - /Users/xiao/IdeaProjects/dockerCompose/本地服务/sixfrpc.toml:/etc/frp/frpc.toml + environment: + - FRP_CONFIG_FILE=/etc/frp/frpc.toml + network_mode: host + + + mac_postgres_six_demo: # postgres镜像 + image: postgres + container_name: mac_postgres_six_demo + restart: unless-stopped + environment: + POSTGRES_USER: "xiaozizi" + POSTGRES_DB: "six_demo" + POSTGRES_PASSWORD: "com792282" + POSTGRESQL_TIMEZONE: "Asia/Shanghai" + ports: + - "5435:5432" + volumes: + - mac_six_demo_postgres:/var/lib/postgresql + networks: + - xiao_network + + + mac_postgres_six: # postgres镜像 + image: postgres + container_name: mac_postgres_six + restart: unless-stopped + environment: + POSTGRES_USER: "xiaozizi" + POSTGRES_DB: "six" + POSTGRES_PASSWORD: "com792282" + POSTGRESQL_TIMEZONE: "Asia/Shanghai" + ports: + - "5433:5432" + volumes: + - postgres_six:/var/lib/postgresql/ + networks: + - xiao_network + + + +networks: + xiao_network: +# 添加一句注释看看能不能自动上传的 +volumes: + postgresData: + redisData: + mac_postgres_data: + mac_six_demo_postgres: + postgres_six_demo: + postgres_six: \ No newline at end of file diff --git a/本地服务/sixfrpc.toml b/本地服务/sixfrpc.toml new file mode 100644 index 0000000..61fefe5 --- /dev/null +++ b/本地服务/sixfrpc.toml @@ -0,0 +1,44 @@ +serverAddr = "106.54.2.188" +serverPort = 7000 +# 认证方式和token,必须与frps配置一致 +auth.method = "token" +auth.token = "sixsixgousite" + +#[[proxies]] +#name = "test_htts2http" +#type = "http" +#localIP = "127.0.0.1" +#localPort = 8000 # 这里的端口号: 就是监听的本地服务的端口号 +#customDomains = ["six.sixgou.com"] +# +[[proxies]] +name = "vite-vue" +type = "http" +localIP = "127.0.0.1" #localIP = "host.docker.internal" +localPort = 8000 # 这里的端口号: 就是监听的本地服务的端口号 +customDomains = ["xiao.sixgou.com"] + + +# 这里监听的是: h5支付的审核接口 +#[[proxies]] +#name = "six-gou" +#type = "http" +#localIP = "127.0.0.1" #localIP = "host.docker.internal" +#localPort = 8000 # 这里的端口号: 就是监听的本地服务的端口号 +#customDomains = ["sixgou.com"] +# +# 在这里监听的是 服务号开发的端口 + +[[proxies]] +name = "wechat-django" +type = "http" +localIP = "127.0.0.1" #localIP = "host.docker.internal" +localPort = 3000 # 这里的端口号: 就是监听的本地服务的端口号 +customDomains = ["wechat.sixgou.com"] + + + + + + + diff --git a/本地服务/yanhuafrpc.toml b/本地服务/yanhuafrpc.toml new file mode 100644 index 0000000..f90b9c1 --- /dev/null +++ b/本地服务/yanhuafrpc.toml @@ -0,0 +1,17 @@ +serverAddr = "122.152.209.38" +serverPort = 7000 +# 认证方式和token,必须与frps配置一致 +auth.method = "token" +auth.token = "sixsixgousite" + +[[proxies]] +name = "yanhua" +type = "https" +customDomains = ["django.jpyanhua.site"] +[proxies.plugin] +type = "https2http" +localAddr = "host.docker.internal:8001" +crtPath = "/etc/frp/yanhuassl/django.jpyanhua.site_bundle.crt" +keyPath = "/etc/frp/yanhuassl/django.jpyanhua.site.key" +hostHeaderRewrite = "127.0.0.1" +requestHeaders.set.x-from-where = "frp" \ No newline at end of file diff --git a/烟花项目配置/Caddyfile b/烟花项目配置/Caddyfile new file mode 100644 index 0000000..e527d78 --- /dev/null +++ b/烟花项目配置/Caddyfile @@ -0,0 +1,4 @@ +caddy.jpyanhua.site { + # 1. 反向代理到 frps 的 HTTP 监听端口 (8080) + reverse_proxy 127.0.0.1:8000 +} diff --git a/烟花项目配置/yanhuaCompose.yaml b/烟花项目配置/yanhuaCompose.yaml new file mode 100644 index 0000000..590eec8 --- /dev/null +++ b/烟花项目配置/yanhuaCompose.yaml @@ -0,0 +1,53 @@ +name: "yanhua_docker" # 项目名称 +services: + django_caddy: + image: caddy + container_name: yanhua_caddy + ports: + - "80:80" # HTTP 端口 + - "443:443" # HTTPS 端口 + - "443:443/udp" # HTTP/3 支持 (可选,提升性能) + volumes: + - /home/ubuntu/Caddyfile:/etc/caddy/Caddyfile + django_postgres: # postgres镜像 + image: postgres + container_name: yanhua_postgres + restart: unless-stopped + environment: + POSTGRES_PASSWORD: "com792282" + # POSTGRESQL_TIMEZONE: "Asia/Shanghai" + ports: + - "5432:5432" + volumes: + - postgresData:/var/lib/postgresql + + django_web: + image: python:3.13 + container_name: yanhua_django + restart: always + stdin_open: true + ports: + - "8000:8000" + + gitea: + image: gitea/gitea:latest + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + volumes: + - gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "2222:22" + + +networks: + xiao_network: +# 添加一句注释看看能不能自动上传的 +volumes: + postgresData: + gitea: