DmaxG commited on
Commit
6d7343c
·
verified ·
1 Parent(s): 5c21f78

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Usa l'immagine ufficiale Node.js 18 basata su Alpine Linux
2
+ FROM node:18-alpine
3
+
4
+ # Installa git per clonare il repository
5
+ RUN apk add --no-cache git
6
+
7
+ # Imposta la directory di lavoro
8
+ WORKDIR /app
9
+
10
+ # Clona il repository GitHub (SOSTITUISCI TUO_USERNAME con il tuo username GitHub)
11
+ RUN git clone https://github.com/OlinadWiz/Kronos.git . && \
12
+ rm -rf .git
13
+
14
+ # Installa solo le dipendenze di produzione
15
+ RUN npm ci --only=production && \
16
+ npm cache clean --force
17
+
18
+ # Espone la porta 7860 richiesta da Hugging Face Spaces
19
+ EXPOSE 7860
20
+
21
+ # Imposta le variabili d'ambiente
22
+ ENV PORT=7860 \
23
+ NODE_ENV=production
24
+
25
+ # Comando di avvio del server
26
+ CMD ["node", "server.js"]