ubantu22.04安装docker
一套流程,docker,nginx,nvm,开启端口,最好一行一行跑
sudo apt update sudo apt upgrade apt-get install ca-certificates curl gnupg lsb-release curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" apt-get install docker-ce docker-ce-cli containerd.io systemctl start docker apt-get -y install apt-transport-https ca-certificates curl software-properties-common service docker restart docker -v
apt install lrzsz tree
apt install nginx cd /etc/nginx/ mkdir vhost cd vhost/
rz cd .. vim nginx.conf
include /etc/nginx/vhost/*.conf; sudo systemctl restart nginx nginx -t
docker run --name geminiprochat \ --restart always \ -p 3030:3000 \ -itd \ -e GEMINI_API_KEY=xxx \ howie6879/geminiprochat:v0.1.0
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm -v nvm install v21.6.0 node -v npm -v
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3001:3000 \ -e OPENAI_API_KEY=xxx \ -e GOOGLE_API_KEY=xx \ yidadaa/chatgpt-next-web
|
nginx
server { listen 80; server_name api.cwrising.top;
location / { proxy_pass http://localhost:3000; } }
server { listen 80; server_name gemini.cwrising.top;
location / { proxy_pass http://localhost:3030; } }
server { listen 80; server_name gpt.cwrising.top;
location / { proxy_pass http://localhost:3001; } }
|