Skip to content
Snippets Groups Projects
Commit 5450eedc authored by Mariana Molina's avatar Mariana Molina
Browse files

Se agregan Dockerfile y docker-compose para el uso de Docker

parent 9c0ff680
Branches master
No related tags found
No related merge requests found
FROM node:12
WORKDIR /app
COPY package*.json /app/
COPY . /app
RUN npm install
EXPOSE 8081
CMD [ "node", "src/index.js" ]
version: "3"
services:
nosql:
restart: always
build: .
ports:
- "8081:8081"
links:
- mongo
mongo:
container_name: mongo
image: mongo
ports:
- "27017:27017"
// CONEXIÓN CON MONGODB // CONEXIÓN CON MONGODB
const mongo = require('mongodb'); const mongo = require('mongodb');
// Connection URL // Connection URL
const url = "mongodb://localhost:27017"; const url = "mongodb://mongo:27017";
// CONEXIÓN CON DYNAMODB // CONEXIÓN CON DYNAMODB
var AWS = require("aws-sdk"); var AWS = require("aws-sdk");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment