Skip to content

Commit

Permalink
D03 w docker
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRedondoo committed Jul 4, 2024
1 parent b953186 commit 1cc1b6c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Usar una imagen base oficial de Node.js
FROM node:18

# Crear un directorio de trabajo
WORKDIR /app

# Copiar package.json y package-lock.json
COPY package*.json ./

# Instalar las dependencias del proyecto
RUN npm install

# Copiar el resto del código de la aplicación
COPY . .

# Exponer el puerto en el que tu aplicación escuchará
EXPOSE 3000

# Comando para ejecutar tu aplicación
CMD ["npm", "start"]
Empty file added docker-compose.yml
Empty file.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {apiUfc} from './API/api-v1.js';
let dataUfc = new dataStore();

let app = express();
const PORT = (process.env.PORT || 10002);
const PORT = (process.env.PORT || 3000);

app.use(cors({
"origin": "*",
Expand Down

0 comments on commit 1cc1b6c

Please sign in to comment.