Compare commits
No commits in common. "37df364d95ce9d1ebbcdafc80851bf54fdf885a1" and "8c7468be188012ff3b0560289ef038de7ea56cab" have entirely different histories.
37df364d95
...
8c7468be18
|
@ -1,3 +1,5 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
image: mongo:bionic
|
||||
|
@ -14,8 +16,7 @@ services:
|
|||
bot-api:
|
||||
image: oven/bun:1
|
||||
container_name: bot-api
|
||||
entrypoint: /bin/bash -c
|
||||
command: ["bun --hot run src/index.ts"]
|
||||
command: bun run docker-dev
|
||||
working_dir: /usr/src/app
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "bun run src/index.ts",
|
||||
"docker-dev": "bun --hot run src/index.ts",
|
||||
"dev": "docker compose down -v && docker compose up",
|
||||
"test": "docker compose down -v && docker compose run bot-api 'bun test'"
|
||||
"test": "docker compose down -v && docker compose run bot-api bun test"
|
||||
},
|
||||
"dependencies": {
|
||||
"compression": "^1.7.4",
|
||||
|
|
|
@ -35,15 +35,9 @@ export const startApp = async () => {
|
|||
pass: mongo_pass,
|
||||
});
|
||||
mongoose.set("runValidators", true);
|
||||
const server = app.listen(port, () =>
|
||||
app.listen(port, () =>
|
||||
logger.info(`Express server listening on port ${port}`)
|
||||
);
|
||||
process.on("SIGTERM", () => {
|
||||
server.close(() => {
|
||||
logger.info('Server closed');
|
||||
process.exit(0);
|
||||
});
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
process.exit(1);
|
||||
|
|
Loading…
Reference in New Issue