Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agregar soporte para deploy con docker #49

Open
PatrickGardiner opened this issue May 20, 2023 · 0 comments
Open

Agregar soporte para deploy con docker #49

PatrickGardiner opened this issue May 20, 2023 · 0 comments

Comments

@PatrickGardiner
Copy link

PatrickGardiner commented May 20, 2023

  1. Armar Dockerfile

    # Use an official Node.js runtime as the base image
    FROM node:20-alpine as node_build
    
    # Set the working directory inside the container
    WORKDIR /usr/src/app
    
    # Copy package.json and package-lock.json to the working directory
    COPY package*.json ./
    
    # Install app dependencies
    RUN npm install
    
    # Copy the rest of the application code to the working directory
    COPY . .
    
    # Expose the port that the app will run on
    EXPOSE 7070
    
    # Define the command to run your app
    CMD [ "npm", "start" ]
  2. Agregar ayuda de build y run en el README.md

    ## Instanciar localmente
    
    ## NPM
    
    * Correr
        ```shell
        npm install
        npm start
        ```
    * Acceder:  `http://localhost:7070/api`
    
    ### Docker
    
    * Correr
        ```shell
        docker build -t api-dolar-argentina .
        docker run -p 80:7070 -d api-dolar-argentina
        ```
    
    * Acceder:  `http://localhost/api`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant