test epusdt
This commit is contained in:
parent
b620fbcbe7
commit
6e1e2749c3
|
@ -0,0 +1,23 @@
|
|||
FROM golang:alpine AS build
|
||||
|
||||
WORKDIR /
|
||||
ENV CGO_ENABLED=0
|
||||
RUN apk add git
|
||||
RUN git clone https://github.com/assimon/epusdt
|
||||
RUN mv epusdt/src /
|
||||
|
||||
WORKDIR /src
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /out/epusdt .
|
||||
|
||||
FROM alpine
|
||||
LABEL maintainer="stille@ioiox.com"
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/epusdt /app/epusdt
|
||||
COPY --from=build /src/static /app/static
|
||||
RUN set -xe \
|
||||
&& chmod +x /app/epusdt
|
||||
|
||||
CMD /app/epusdt http start
|
|
@ -0,0 +1,8 @@
|
|||
# dujiaoka
|
||||
GitHub [stilleshan/dockerfiles](https://github.com/stilleshan/dockerfiles)
|
||||
Docker [stilleshan/epusdt](https://hub.docker.com/r/stilleshan/epusdt)
|
||||
> *docker image support for X86 and ARM*
|
||||
|
||||
|
||||
## 简介
|
||||
需搭配 dujiaoka 使用
|
|
@ -0,0 +1,26 @@
|
|||
version: "3"
|
||||
services:
|
||||
db:
|
||||
image: mariadb:focal
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=CHANGE_YOUR_PASSWORD
|
||||
- MYSQL_DATABASE=epusdt
|
||||
- MYSQL_USER=epusdt
|
||||
- MYSQL_PASSWORD=CHANGE_YOUR_PASSWORD
|
||||
volumes:
|
||||
- ./mysql:/var/lib/mysql
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
|
||||
epusdt:
|
||||
image: stilleshan/epusdt
|
||||
restart: always
|
||||
volumes:
|
||||
- ./epusdt.conf:/app/.env
|
||||
ports:
|
||||
- 8000:8000
|
|
@ -0,0 +1,61 @@
|
|||
app_name=epusdt
|
||||
#下面配置你的域名,收银台会需要
|
||||
app_uri=https://dujiaoka.com
|
||||
#是否开启debug,默认false
|
||||
app_debug=false
|
||||
#http服务监听端口
|
||||
http_listen=:8000
|
||||
|
||||
#静态资源文件目录
|
||||
static_path=/static
|
||||
#缓存路径
|
||||
runtime_root_path=/runtime
|
||||
|
||||
#日志配置
|
||||
log_save_path=/logs
|
||||
log_max_size=32
|
||||
log_max_age=7
|
||||
max_backups=3
|
||||
|
||||
# mysql配置
|
||||
mysql_host=db
|
||||
mysql_port=3306
|
||||
mysql_user=epusdt
|
||||
mysql_passwd=CHANGE_YOUR_PASSWORD
|
||||
# 请修改 epusdt 数据库密码
|
||||
mysql_database=epusdt
|
||||
mysql_table_prefix=
|
||||
mysql_max_idle_conns=10
|
||||
mysql_max_open_conns=100
|
||||
mysql_max_life_time=6
|
||||
|
||||
# redis配置
|
||||
redis_host=redis
|
||||
redis_port=6379
|
||||
redis_passwd=
|
||||
redis_db=5
|
||||
redis_pool_size=5
|
||||
redis_max_retries=3
|
||||
redis_idle_timeout=1000
|
||||
|
||||
# 消息队列配置
|
||||
queue_concurrency=10
|
||||
queue_level_critical=6
|
||||
queue_level_default=3
|
||||
queue_level_low=1
|
||||
|
||||
#机器人Apitoken
|
||||
tg_bot_token=
|
||||
#telegram代理url(大陆地区服务器可使用一台国外服务器做反代tg的url),如果运行的本来就是境外服务器,则无需填写
|
||||
tg_proxy=
|
||||
#管理员userid
|
||||
tg_manage=
|
||||
|
||||
#api接口认证token
|
||||
api_auth_token=
|
||||
|
||||
#订单过期时间(单位分钟)
|
||||
order_expiration_time=10
|
||||
|
||||
#强制汇率(设置此参数后每笔交易将按照此汇率计算,例如:6.4)
|
||||
forced_usdt_rate=
|
|
@ -0,0 +1,43 @@
|
|||
-- auto-generated definition
|
||||
create table orders
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
trade_id varchar(32) not null comment 'epusdt订单号',
|
||||
order_id varchar(32) not null comment '客户交易id',
|
||||
block_transaction_id varchar(128) null comment '区块唯一编号',
|
||||
actual_amount decimal(19, 4) not null comment '订单实际需要支付的金额,保留4位小数',
|
||||
amount decimal(19, 4) not null comment '订单金额,保留4位小数',
|
||||
token varchar(50) not null comment '所属钱包地址',
|
||||
status int default 1 not null comment '1:等待支付,2:支付成功,3:已过期',
|
||||
notify_url varchar(128) not null comment '异步回调地址',
|
||||
redirect_url varchar(128) null comment '同步回调地址',
|
||||
callback_num int default 0 null comment '回调次数',
|
||||
callback_confirm int default 2 null comment '回调是否已确认? 1是 2否',
|
||||
created_at timestamp null,
|
||||
updated_at timestamp null,
|
||||
deleted_at timestamp null,
|
||||
constraint orders_order_id_uindex
|
||||
unique (order_id),
|
||||
constraint orders_trade_id_uindex
|
||||
unique (trade_id)
|
||||
);
|
||||
|
||||
create index orders_block_transaction_id_index
|
||||
on orders (block_transaction_id);
|
||||
|
||||
-- auto-generated definition
|
||||
create table wallet_address
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
token varchar(50) not null comment '钱包token',
|
||||
status int default 1 not null comment '1:启用 2:禁用',
|
||||
created_at timestamp null,
|
||||
updated_at timestamp null,
|
||||
deleted_at timestamp null
|
||||
)
|
||||
comment '钱包表';
|
||||
|
||||
create index wallet_address_token_index
|
||||
on wallet_address (token);
|
Loading…
Reference in New Issue