Fix errors

This commit is contained in:
Orionis312050 committed 2026-04-16 19:35:58 +02:00
1 parent bb053a6ebe
commit 91c52782fe
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -20,10 +20,10 @@ COPY . .
FROM node:22-alpine FROM node:22-alpine
WORKDIR /app WORKDIR /app
# Récupération de la BDD (et autres) depuis Coolify au build # Récupération de la BDD (et autres) depuis Coolify au build avec valeurs par défaut
ARG DATABASE_URL ARG DATABASE_URL="file:./dev.db"
ENV DATABASE_URL=$DATABASE_URL ENV DATABASE_URL=$DATABASE_URL
ARG PORT ARG PORT=3001
ENV PORT=$PORT ENV PORT=$PORT
# On ne copie que le nécessaire du builder # On ne copie que le nécessaire du builder
+2 -2
View File
@@ -17,7 +17,7 @@ const app = express();
const httpServer = createServer(app); const httpServer = createServer(app);
const io = new Server(httpServer, { const io = new Server(httpServer, {
cors: { cors: {
origin: ["http://localhost:5173"], // Spécifier l'origine pour les credentials origin: process.env.CORS_ORIGIN ? [process.env.CORS_ORIGIN, "http://localhost:5173"] : ["http://localhost:5173"], // Spécifier l'origine pour les credentials
methods: ["GET", "POST", "DELETE", "OPTIONS"], methods: ["GET", "POST", "DELETE", "OPTIONS"],
credentials: true credentials: true
} }
@@ -29,7 +29,7 @@ io.use(socketAuthMiddleware);
const logTracker = new LogTracker(io, prisma); const logTracker = new LogTracker(io, prisma);
app.use(cors({ app.use(cors({
origin: "http://localhost:5173", origin: process.env.CORS_ORIGIN ? [process.env.CORS_ORIGIN, "http://localhost:5173"] : ["http://localhost:5173"],
credentials: true credentials: true
})); }));
app.use(express.json()); app.use(express.json());