Sign inSign up

klerith/flutter-backend-teslo-shop

By klerith

•Updated over 3 years ago

Backend a utilizar en la aplicación del curso de Flutter

Image
8

10K+

klerith/flutter-backend-teslo-shop repository overview

⁠Development ONLY

Este servicio es únicamente para pruebas, sin fines comerciales.

Env VariableRecomendado
APP_VERSION0.0.1
STAGEprod
DB_PASSWORDCualQUierPas2Word
DB_NAMETesloDB
DB_HOSTTesloDB
DB_PORT5432
DB_USERNAMEpostgres
PORT3000
HOST_APIhttp://localhost:3000/api⁠
JWT_SECRETEst3EsMISE3Dsecreto32s

⁠Simple .env file

APP_VERSION=0.0.1

STAGE=prod

DB_PASSWORD=MySecr3tPassWord@as2
DB_NAME=TesloDB
DB_HOST=TesloDB
DB_PORT=5432
DB_USERNAME=postgres

PORT=3000
HOST_API=http://localhost:3000/api

JWT_SECRET=Est3EsMISE3Dsecreto32s

⁠Database SEED

Llenar la base de datos con este API Endpoint

http://localhost:3000/api/seed⁠

⁠Documentación de los Endpoints

http://localhost:3000/api⁠

⁠Todo en un sólo comando

docker-compose.yaml

version: '3'

services:

  app:
    container_name: nest-app
    image: klerith/flutter-backend-teslo-shop:latest
    depends_on:
      - db
    ports:
      - ${PORT}:${PORT}
    environment:
      APP_VERSION: ${APP_VERSION}
      STAGE: ${STAGE}
      DB_PASSWORD: ${DB_PASSWORD}
      DB_NAME: ${DB_NAME}
      DB_HOST: ${DB_HOST}
      DB_PORT: ${DB_PORT}
      DB_USERNAME: ${DB_USERNAME}
      PORT: ${PORT}
      HOST_API: ${HOST_API}
      JWT_SECRET: ${JWT_SECRET}
  
  db:
    image: postgres:15.2
    restart: always
    ports:
      - "5432:5432"
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_NAME}
    container_name: ${DB_NAME}
    volumes:
      - postgres-db:/var/lib/postgresql/data


volumes:
  postgres-db:
    external: false

⁠Información de los usuarios en el SEED

{
    "email": "[email protected]",
    "password": "Abc123"
}

{
    "email": "[email protected]",
    "password": "Abc123"
}

Tag summary

Content type

Image

Digest

sha256:d651a9382…

Size

94.6 MB

Last updated

over 3 years ago

docker pull klerith/flutter-backend-teslo-shop