[mod] certificate連結到共用證書
This commit is contained in:
parent
38d4f5e432
commit
1ff3e7c722
@ -1,5 +1,7 @@
|
||||
# sudo docker build -t linebotts .
|
||||
# sudo docker exec -it 2e8e3995aa52 /bin/bash
|
||||
# sudo docker run -v /volume1/homes/JianMiau/www/certificate:/certificate --name=linebotts --restart always --net=host linebotts
|
||||
# docker ps
|
||||
# sudo docker exec -it f39bfa9c0819 /bin/bash
|
||||
|
||||
# 選擇node
|
||||
FROM node:19.4.0
|
||||
@ -10,6 +12,8 @@ ENV NODE_ENV=production
|
||||
# 指定預設/工作資料夾
|
||||
WORKDIR /app
|
||||
|
||||
VOLUME ["/certificate"]
|
||||
|
||||
# 只copy package.json檔案
|
||||
COPY ["package.json", "./"]
|
||||
|
||||
|
@ -28,9 +28,9 @@ export default class LineBotClass {
|
||||
*/
|
||||
constructor() {
|
||||
//讀取憑證及金鑰
|
||||
const prikey: string = fs.readFileSync("./certificate/RSA-privkey.pem", "utf8");
|
||||
const cert: string = fs.readFileSync("./certificate/RSA-cert.pem", "utf8");
|
||||
const cafile: string = fs.readFileSync("./certificate/RSA-chain.pem", "utf-8");
|
||||
const prikey: string = fs.readFileSync("/certificate/RSA-privkey.pem", "utf8");
|
||||
const cert: string = fs.readFileSync("/certificate/RSA-cert.pem", "utf8");
|
||||
const cafile: string = fs.readFileSync("/certificate/RSA-chain.pem", "utf-8");
|
||||
|
||||
//建立憑證及金鑰
|
||||
const credentials: Object = {
|
||||
|
Loading…
Reference in New Issue
Block a user