Base README
This commit is contained in:
parent
98c92835ef
commit
63807567d6
3 changed files with 65 additions and 1 deletions
66
README.md
66
README.md
|
|
@ -1,2 +1,66 @@
|
||||||
# canasta-back
|
# Canasta Backend
|
||||||
|
|
||||||
|
Backend de servidor de manejo de productos para grupos de compra
|
||||||
|
|
||||||
|
# Instalación
|
||||||
|
|
||||||
|
Requiere tener [Docker](https://docs.docker.com/engine/install) instalado en el sistema
|
||||||
|
|
||||||
|
## 1. Clonar repositorio
|
||||||
|
```console
|
||||||
|
git clone https://git.mps.org.uy/mps-informatica/canasta-back.git
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. Crear entorno virtual python
|
||||||
|
|
||||||
|
## 2.1. Opción 1: Pycharm
|
||||||
|
|
||||||
|
[Pycharm](https://www.jetbrains.com/pycharm/) ofrece una manera fácil de trabajar en un projecto python
|
||||||
|
|
||||||
|
**2.1.1** Abrir el proyecto en pycharm
|
||||||
|
|
||||||
|
**2.1.2** En `Settings/Python/Interpreter` > `Add Interpreter/Add Local Interpreter...`
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**2.1.3** Los valores por defecto están bien
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Pycharm include una terminal que ya hace los llamados desde el entorno virtual, para los comandos relacionados a python se debe usar esta terminal
|
||||||
|
|
||||||
|
## 2.2. Opción 2: Venv
|
||||||
|
|
||||||
|
_Próximamente_
|
||||||
|
|
||||||
|
## 3. Instalar librerías
|
||||||
|
|
||||||
|
Este comando instala las librerías de python necesarias
|
||||||
|
|
||||||
|
```console
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. Generar una clave
|
||||||
|
Este comando de python genera una clave para usar en esta aplicación, copiar el resultado
|
||||||
|
```console
|
||||||
|
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. Variables de entorno
|
||||||
|
|
||||||
|
Duplicar archivo `.env.example` y renombrar a `.env`
|
||||||
|
|
||||||
|
Pegar la clave generada en el campo `DJANGO_SECRET_KEY`
|
||||||
|
|
||||||
|
## 6. Build
|
||||||
|
|
||||||
|
|
||||||
|
```console
|
||||||
|
docker compose up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
## 7. Listo!
|
||||||
|
|
||||||
|
Abrir en el navegador en [localhost:8000](http://localhost:8000)
|
||||||
|
|
|
||||||
BIN
resources/pycharm-add-local-interpreter-2.png
Normal file
BIN
resources/pycharm-add-local-interpreter-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
resources/pycharm-add-local-interpreter.png
Normal file
BIN
resources/pycharm-add-local-interpreter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
Loading…
Add table
Reference in a new issue