Skip to content

Commit

Permalink
fix: 🐛 Fix the bug that docker failed to start
Browse files Browse the repository at this point in the history
Fix the bug that docker failed to start
  • Loading branch information
RealTong committed Mar 20, 2023
1 parent a465b6b commit 4d079a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV WECHATY_PUPPET_WECHAT_ENDPOINT=/usr/bin/google-chrome
#ENV WECHATY_PUPPET_WECHAT_ENDPOINT=/usr/bin/google-chrome
CMD xvfb-run --server-args="-screen 0 1280x800x24 -ac -nolisten tcp -dpi 96 +extension RANDR" npm run dev
9 changes: 1 addition & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ const chatGPTBot = new ChatGPTBot();

const bot = WechatyBuilder.build({
name: "wechat-assistant", // generate xxxx.memory-card.json and save login data for the next login
puppet: "wechaty-puppet-wechat", // generate xxxx.memory-card.json and save login data for the next login
puppetOptions: {
uos: true
}
});
async function main() {
const initializedAt = Date.now()
Expand Down Expand Up @@ -41,9 +37,6 @@ async function main() {
} catch (e) {
console.error(e);
}
})
.on("error",(e)=>{
console.log(`ERROR !!! ${e}`);
});
try {
await bot.start();
Expand All @@ -53,4 +46,4 @@ async function main() {
);
}
}
main();
main();

0 comments on commit 4d079a0

Please sign in to comment.