GithubHelp home page GithubHelp logo

deploy_django_react's Introduction

Instrucciones para deploy de Bakend y Frotend

El deploy se realizar con Docker Compose.

Requisitos

  • Docker Engine >=v20.10.7
  • Docker Compose >=1.27.4

Instalacio de requisitos

Utilice el siguiente enlace para conocer instalación de los requisitos:

Clonar repositorio

git clone https://github.com/lbrines/deploy_django_react.git

Deploy en desarrollo

docker-compose --env-file .env.dev  up -d --build
Resultado
Building backend
Step 1/8 : FROM python:3.6
---> b58bb3901b01
Step 2/8 : ENV PYTHONUNBUFFERED=1
---> Using cache
---> 7a44527d38cb
Step 3/8 : RUN apt-get update && apt-get install graphviz graphviz-dev postgresql-client -y && rm -rf /var/lib/apt/lists/*
---> Using cache
---> cdeaf9142f85
Step 4/8 : RUN pip install psycopg2 && pip install psycopg2-binary
---> Using cache
---> ba1aaa52ed0f
Step 5/8 : WORKDIR /code
---> Using cache
.
.
.
.
Starting prueba02_db_1 ... done
Starting prueba02_backend_1 ... done
Starting prueba02_frontend_1 ... done

Deploy en produccion

docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml --env-file .env.prod  up -d --build
Resultado
.
.
.
---> d09e31a283f4
Step 5/12 : RUN npm install
---> Using cache
---> 1e459afb81d4
Step 6/12 : RUN npm run build
---> Running in e824d9b7a7bb

> [email protected] build /app
> node scripts/build.js

Creating an optimized production build..
  .
  .
  .
Creating prueba02_db_1 ... done
Creating prueba02_backend_1 ... done
Creating prueba02_frontend_1 ... done

Verificación de container

docker ps
Resultado
CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS          PORTS                                                                          NAMES
83eabdd1c8f9   prueba02_frontend   "/docker-entrypoint.…"   56 seconds ago   Up 54 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp   prueba02_frontend_1
15c594cb431a   prueba02_backend    "sh start.sh db"         56 seconds ago   Up 55 seconds   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp                                      prueba02_backend_1
3346e6f6eb7a   postgres            "docker-entrypoint.s…"   57 seconds ago   Up 56 seconds   5432/tcp                                                                       prueba02_db_1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.