从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
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
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
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
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
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