Skip to content

Commit

Permalink
Update socket.ts and docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne committed Feb 14, 2024
1 parent ef8f648 commit e23d5df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/src/routes/socket.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import http from "http";
import fs from "fs";
import https from "https";
import cors from "cors";
import { Server } from "socket.io";
import { log } from "../utils/log.js";
Expand All @@ -13,7 +14,12 @@ export const app = express();
app.use(cors());
dotenv.config();

export const server = http.createServer(app);
const options = {
key: fs.readFileSync("/acme/live/kurama-chat.xyz/privkey.pem"),
cert: fs.readFileSync("/acme/live/kurama-chat.xyz/fullchain.pem"),
};

export const server = https.createServer(app);

const io = new Server(server, {
cors: {
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
command: sh -c "npm install && npm rebuild bcrypt --build-from-source && npx nodemon"
volumes:
- ./backend:/backend
- ./volumes/traefik/acme:/acme
networks:
- web
environment:
Expand Down

0 comments on commit e23d5df

Please sign in to comment.