---
# System prepended metadata

title: gcp設定

---

 [wordpress維護](https://hackmd.io/UsZd9tzOTzOfDgiQPycXoA)
# gcp設定
http://35.189.183.224/wp-admin/
記得要把wordpress passoword 記下,id user 

[gcp install wordpress](https://www.taskinghouse.com/posts/install-wordpress-certified-by-bitnami-gcp-ssl-on-google-cloud-platform/)

## vm from market place
## fix ip
## dns setting 
namecheap設定dns: ns-cloud.googledomains.com
主機ip
a ip
##別名
ch www.aicoach.cc aicoach.cc
## ssh改root
sudo passwd
docker build -t hybrid .
docker run -p 8000:8000 hybrid
https://www.taskinghouse.com/posts/install-wordpress-certified-by-bitnami-gcp-ssl-on-google-cloud-platform/


http://dns-learning.twnic.net.tw/bind/intro6.html
user@server[~]# sudo passwd
Changing password for user root.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[import export wordpress 網站](https://github.com/d0n601/All-In-One-WP-Migration-With-Import)
## putty ssh
https://mrtang.tw/blog/post/connect-via-putty-to-linux-vm-on-gcp
## 改大小
https://docs.bitnami.com/aws/apps/wordpress/administration/increase-upload-limit-php/

## ssl
https://docs.bitnami.com/google/how-to/generate-install-lets-encrypt-ssl/

[dns setting](https://www.whatsmydns.net/)

[vi](https://dywang.csie.cyut.edu.tw/dywang/linuxSystem/node50.html)
## ssl
sudo /opt/bitnami/bncert-tool
## wordpress 重啟
sudo /opt/bitnami/ctlscript.sh restart

## aws
## install awscli, lightsailctl from aws website
## local 安裝 docker 並啟動
## [參考aws 設定](https://aws.amazon.com/tw/tutorials/serve-a-flask-app/)
## region
ap-northeast-1
aws configure
docker build -t hybrid .
docker run -p 8000:8000 hybrid
aws lightsail create-container-service --service-name hybrid --power small --scale 1
# 啟動docker
cd 目錄有lightsailctl.exe
aws lightsail push-container-image --service-name hybrid --label hybrid --image hybrid
cd hybrid
aws lightsail create-container-service-deployment --service-name hybrid --containers file://containers.json --public-endpoint file://public-endpoint.json

aws lightsail get-container-services --service-name hybrid

# https://github.com/seiching/gradioGPT
docker build -t laplacegpt .
docker run --rm -it -p 7860:7860  laplacegpt
cd..
create container
cd ..
push container
aws lightsail push-container-image --service-name laplacegpt --label laplacegpt --image laplacegpt
deploy container
cd gradioGPT
aws lightsail create-container-service-deployment --service-name laplacegpt --containers file://containers.json --public-endpoint file://public-endpoint.json
## chatgpt sample
https://github.com/mayooear/gpt4-pdf-chatbot-langchain
https://github.com/techleadhd/chatgpt-retrieval
https://github.com/Duxpiex/ChatGPT-with-documents
# 佈署 insugpt
docker build -t insugpt .
docker run --rm -it -p 7860:7860 insugpt
cd.. 
aws lightsail push-container-image --service-name insugpt --label insugpt --image insugpt
## 跑完最後有一個編號要留下來修改containers.json,改完後
#Refer to this image as ":flask-service.flask-container.X" #in depl
aws lightsail create-container-service-deployment --service-name insugpt --containers file://containers.json --public-endpoint file://public-endpoint.json

https://github.com/smaameri/multi-doc-chatbot
https://nanonets.com/blog/chat-with-pdfs-using-chatgpt-and-openai-gpt-api/

docker build -t chatmydata .
docker run --rm -it -p 7860:7860 chatmydata
pucsh container
chatmydata
aws lightsail push-container-image --service-name chatmydata --label chatmydata --image chatmydata

deploy
aws lightsail create-container-service-deployment --service-name chatmydata --containers file://containers.json --public-endpoint file://public-endpoint.json

ehydro
docker build -t ehydro .
docker run --rm -it -p 7860:7860 ehydro
aws lightsail push-container-image --service-name ehydro --label ehydro --image ehydro
aws lightsail create-container-service-deployment --service-name ehydro --containers file://containers.json --public-endpoint file://public-endpoint.json

faq
docker build -t faq .
docker run --rm -it -p 7860:7860 faq
aws lightsail push-container-image --service-name faq --label faq --image faq
deploy
aws lightsail create-container-service-deployment --service-name faq --containers file://containers.json --public-endpoint file://public-endpoint.json

chatbotui
docker build -t chatbotui .
docker run  -p 3000:3000 chatbotui
aws lightsail push-container-image --service-name chatbotui --label chatbotui --image chatbotui
aws lightsail create-container-service-deployment --service-name chatbotui --containers file://containers.json --public-endpoint file://public-endpoint.json

