章工运维 章工运维
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)

章工运维

业精于勤,荒于嬉
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)
  • linux

  • windows

  • 中间件

  • 网络

  • 安全

  • 存储

  • 防火墙

  • 数据库

  • 系统

  • docker

  • other

    • debian中科大替换教程
    • Alpine安装php各种扩展
    • 使用http-server启动本地服务
    • windows文件同步备份
    • axure将项目同步到svn和axhub
    • Makefile入门
    • Rsyslog开源日志服务器
    • 在windows64位系统安装mysql
    • 博客vue报错版本依赖问题解决
    • VMware搭建群晖
    • 一个开源的照片管理程序——photoprism
    • 搭建属于自己的云笔记——leanote
    • 浏览器跨域问题
    • 从0到1搭建支付和发卡系统
    • 运维常见故障及排查方法
    • 高德MCP智能体搞定旅游计划
    • 不花一分钱从0到1建站教程
  • 监控

  • 运维
  • other
章工运维
2024-10-23

从0到1搭建支付和发卡系统

# 搭建发卡系统

github地址:https://github.com/assimon/dujiaoka

version: "3"
services:



  dujiaoka:
    image: "jiangjuhong/dujiaoka:latest"
    container_name: dujiaoka
    volumes:
      - ./.env:/app/.env
      #初始化安装配置,初始化完成需要启动
      #- ./install.lock:/app/install.lock
    environment:
      WEB_DOCUMENT_ROOT: /app/public
      TZ: Asia/Shanghai
    ports:
      - "10481:80"
    restart: always 
  db:
    image: mariadb:focal
    container_name: faka-data
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=c486561c40fe774xxac54c9d
      - MYSQL_DATABASE=dujiaoka
      - MYSQL_USER=dujiaoka
      - MYSQL_PASSWORD=c486561c40fe774xxac54c9d
    volumes:
      - ./data:/var/lib/mysql:rw
      - /etc/localtime:/etc/localtime

  redis:
    image: redis:alpine
    container_name: faka-redis
    restart: always
    volumes:
      - ./redis:/data:rw
      - /etc/localtime:/etc/localtime
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 安装v免签

github地址:GitHub - szvone/vmqphp: V免签PHP版 完全开源免费的个人免签约解决方案 (opens new window)

version: '3'
services:
    web:
        image: nginx:1.20.2
        container_name: v-pay_web
        restart: always
        ports:
            - "10483:80"
        volumes:
            - /etc/localtime:/etc/localtime:ro
            - ./nginx.conf/site.conf:/etc/nginx/conf.d/default.conf
            #- ./nginx.conf/nginx.conf:/etc/nginx/nginx.conf
            - ./nginx.log:/var/log/nginx
            - phpsocket:/var/run
            - ./vmqphp-1.12:/app
            #- ./v-new:/app
        working_dir: /app
        depends_on:
            - php
        networks:
            - code-network
    php:
        image: php:7.2.34-fpm-alpine
        container_name: v-pay
        restart: always
        volumes:
            - /etc/localtime:/etc/localtime:ro
            #- ./php.log:/app/storage/logs
            #- ./config/.env:/app/.env
            - ./php.conf/php.ini:/usr/local/etc/php/php.ini
            #- phpsocket:/var/run
            - ./vmqphp-1.12:/app
            #- ./v-new:/app
        working_dir: /app
        networks:
            - code-network

networks:
    code-network:
        driver: bridge

volumes:
    phpsocket: {}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

nginx配置

server {
    listen 80;
    server_name localhost;
    root /app/public;

    client_max_body_size 50m;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    add_header 'Access-Control-Allow-Headers' 'X-CSRF-Token';

    index index.html index.htm index.php;

    charset utf-8;

    location / { 
      if (!-e $request_filename) {
        rewrite  ^(.*)$  /index.php?s=/$1  last;
      }
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        root /app/public;
        fastcgi_pass                  php:9000;
        fastcgi_index                 index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include                       fastcgi_params;
    }

    #location ~ /\.(?!well-known).* {
    #    deny all;
   # }
   # location ~* \.(sh)$ {
   #  deny all;    
   # }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

# 安装彩虹易支付

github地址:https://github.com/zpj874878956/yzhifu

version: '3'
services:
    web:
        image: nginx:1.20.2
        container_name: ch-pay_web
        restart: always
        ports:
            - "10483:80"
        volumes:
            - /etc/localtime:/etc/localtime:ro
            - ./nginx.conf/site.conf:/etc/nginx/conf.d/default.conf
            #- ./nginx.conf/nginx.conf:/etc/nginx/nginx.conf
            - ./nginx.log:/var/log/nginx
            - phpsocket:/var/run
            - ./yzhifu:/app
        working_dir: /app
        depends_on:
            - php
        networks:
            - code-network
    php:
        image: php:7.2.34-fpm-alpine
        container_name: ch-pay
        restart: always
        volumes:
            - /etc/localtime:/etc/localtime:ro
            #- ./php.log:/app/storage/logs
            #- ./config/.env:/app/.env
            - ./php.conf/php.ini:/usr/local/etc/php/php.ini
            #- phpsocket:/var/run
            - ./yzhifu:/app
        working_dir: /app
        networks:
            - code-network

networks:
    code-network:
        driver: bridge

volumes:
    phpsocket: {}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

nginx配置

server {
    listen 80;
    server_name localhost;
    root /app;

    client_max_body_size 50m;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    add_header 'Access-Control-Allow-Headers' 'X-CSRF-Token';

    index index.html index.htm index.php;

    charset utf-8;

location / {
 if (!-e $request_filename) {
   rewrite ^/(.[a-zA-Z0-9\-\_]+).html$ /index.php?mod=$1 last;
 }
 rewrite ^/pay/(.*)$ /pay.php?s=$1 last;
}
location ^~ /plugins {
  deny all;
}
location ^~ /includes {
  deny all;
}

    location ~ \.php$ {
        fastcgi_pass                  php:9000;
        fastcgi_index                 index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include                       fastcgi_params;
    }

    #location ~ /\.(?!well-known).* {
    #    deny all;
   # }
   # location ~* \.(sh)$ {
   #  deny all;    
   # }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
微信 支付宝
上次更新: 2024/10/23, 16:46:38

← 浏览器跨域问题 运维常见故障及排查方法→

最近更新
01
shell脚本模块集合
05-13
02
生活小技巧(认知版)
04-29
03
生活小技巧(防骗版)
04-29
更多文章>
Theme by Vdoing | Copyright © 2019-2025 | 点击查看十年之约 | 鄂ICP备2024072800号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式