Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM denoland/deno:1.18.0 AS BUILDER

WORKDIR /app

COPY deno.jsonc import_map.json ./
COPY src ./src

CMD ["deno", "run", "--allow-net", "--allow-env=RABBITMQ_URI,MONGO_URI,REDIS_URI", "--importmap=./import_map.json", "./src/main.ts"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.9"

services:
postgres:
mongo:
image: mongo:5.0
environment:
MONGO_INITDB_ROOT_USERNAME: $MONGO_USERNAME
Expand Down
19 changes: 13 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { setupJoin } from "./join/mod.ts";
import { setupEdit } from "./edit/mod.ts";
import { setupSave } from "./save/mod.ts";
import { setupView } from "./view/mod.ts";
import { bold } from "std/fmt/colors";

const rmqConn = await connect(Deno.env.get("RABBITMQ_URI")!);
export const rmqChan = await rmqConn.openChannel();
Expand All @@ -12,9 +13,15 @@ await setupJoin();
await setupEdit();
await setupSave();

rmqConn.closed().then(() => {
console.log("Closed peacefully");
}).catch((error) => {
console.error("Connection closed with error");
console.error(error.message);
});
console.log(bold(`Starting`));

/*
rmqConn.closed()
.then(() => {
console.log("Closed peacefully");
})
.catch((error) => {
console.error("Connection closed with error");
console.error(error.message);
});
*/