Current Mac Files
This commit is contained in:
15
tesloshop-backend-main/.env.template
Normal file
15
tesloshop-backend-main/.env.template
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
1
tesloshop-backend-main/.gitignore
vendored
Normal file
1
tesloshop-backend-main/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
||||
27
tesloshop-backend-main/README.md
Normal file
27
tesloshop-backend-main/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Nest - TesloShop Backend
|
||||
|
||||
## Development
|
||||
|
||||
1. Tener corriendo el servicio de Docker (Docker Desktop o Docker Daemon)
|
||||
2. Clonar el archivo **.env.template** y renombrar la copia a **.env**
|
||||
3. Levantar los servicios con el comando
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
4. Llenar la base de datos con data temporal:
|
||||
|
||||
http://localhost:3000/api/seed
|
||||
|
||||
5. Documentación de los endpoints disponibles:
|
||||
|
||||
http://localhost:3000/api
|
||||
|
||||
# Extra
|
||||
|
||||
Si desean saber más sobre docker y cómo se construyó esta imagen, esto es parte de mi curso de Nest y Docker:
|
||||
|
||||
[Cursos sobre Docker](https://fernando-herrera.com/courses?q=docker)
|
||||
|
||||
[Imagen en DockerHub](https://hub.docker.com/repository/docker/klerith/flutter-backend-teslo-shop/general)
|
||||
39
tesloshop-backend-main/docker-compose.yml
Normal file
39
tesloshop-backend-main/docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
app:
|
||||
container_name: nest-app
|
||||
restart: always
|
||||
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:16.1
|
||||
restart: always
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
container_name: ${DB_NAME}
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_postgresql/tesloshop_db:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres-db:
|
||||
external: false
|
||||
Reference in New Issue
Block a user