| "Debug": true, | "Debug": true, | ||||
| "Static": [ | "Static": [ | ||||
| { | { | ||||
| "Dir": "./html/", | |||||
| "Dir": "/mnt/hgfs/workspace/2021-07-31-BiukopWeb", | |||||
| "StaticUrl": "/", | "StaticUrl": "/", | ||||
| "StripPrefix" : "/" | "StripPrefix" : "/" | ||||
| }, | }, |
| { | |||||
| "Host":"0.0.0.0", | |||||
| "Port":"8080", | |||||
| "DSN": "sp:sp@tcp(192.168.1.70:3306)/syd_credit?parseTime=true&loc=Australia%2FSydney&collation=utf8mb4_0900_ai_ci", | |||||
| "TlsCert": "cert/fullchain.pem", | |||||
| "TlsKey": "cert/privkey.pem", | |||||
| "Debug": true, | |||||
| "Static": [ | |||||
| { | |||||
| "Dir": "./html/", | |||||
| "StaticUrl": "/", | |||||
| "StripPrefix" : "/" | |||||
| }, | |||||
| { | |||||
| "Dir": "./html/test/", | |||||
| "StaticUrl": "/spa1/", | |||||
| "StripPrefix" : "/spa1/" | |||||
| }, | |||||
| { | |||||
| "Dir": "./html/test/", | |||||
| "StaticUrl": "/spa2/", | |||||
| "StripPrefix" : "/spa2/" | |||||
| } | |||||
| ], | |||||
| "Session" : { | |||||
| "Guest": true, | |||||
| "Year": 10, | |||||
| "Month": 1, | |||||
| "Day": 1 | |||||
| } | |||||
| } |
| mkdir -p /tmp/goweb | mkdir -p /tmp/goweb | ||||
| echo "prepare golang project" | echo "prepare golang project" | ||||
| rsync -a $PROJ_DIR /tmp/goweb/ | rsync -a $PROJ_DIR /tmp/goweb/ | ||||
| rm -rf /tmp/goweb/html/* | |||||
| cp -f $PROJ_DIR/deploy/config_production.json /tmp/goweb/config.json | |||||
| rm -rf /tmp/goweb/html/css | |||||
| rm -rf /tmp/goweb/html/test | |||||
| rm -rf /tmp/goweb/html/*.html | |||||
| echo "sync Web html" | echo "sync Web html" | ||||
| rsync -a /mnt/hgfs/workspace/2021-07-31-BiukopWeb/ /tmp/goweb/html/ | rsync -a /mnt/hgfs/workspace/2021-07-31-BiukopWeb/ /tmp/goweb/html/ | ||||
| cd /tmp/goweb | cd /tmp/goweb | ||||
| gcloud app deploy | gcloud app deploy | ||||