Giter VIP home page Giter VIP logo

chatgpt's Introduction

概述

一键启动前后端,数据库密码一定要设置复杂点。

修改配置

修改 server\config\index.js 中的邮箱配置,还要修改的是mysql的账户密码。

修改docker-compose 文件中的数据库配置信息,主要是下面3行,这里要和上文的mysql账户密码一致。

- MYSQL_DATABASE=chatgpt
- MYSQL_USER=chatgpt
- MYSQL_PASSWORD=chatgpt

运行

克隆项目

git clone https://github.com/rita-iot/chatgpt.git
cd chatgpt

运行

# 编译
docker compose build
# 后台运行
docker compose up -d
# 删除容器
docker compose down

启动成功

docker logs mapp
#显示如下即为运行成功
#MySQL database connection succeeded.

导入数据库

ip:8001打开phpmyadmin,输入配置的用户名和密码

ip:8001

使用

ip

打开ip,注册账号使用即可。

自行打包前端

使用client目录下的源码,指定 .env.production 如下即可。

# 请求地址
VITE_APP_REQUEST_HOST=pro

反代配置

server {
    listen 80;
    listen 443 ssl;
    server_name a.xxx.com;
    ssl_certificate /etc/nginx/xxx.com/cert.pem;
    ssl_certificate_key /etc/nginx/xxx.com/key.pem;
    location /auth {
        root /var/www/faka;
        index index.html;
    }
    if ($scheme != "https") {
        return 301 https://$server_name$request_uri;
    }
    location / {
        proxy_pass http://localhost:8002/;
    	proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_buffering off;
    }
}

Star History

Star History Chart

chatgpt's People

Contributors

mxrk314 avatar rita-iot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.