feat: created docker-compose.yml
This commit is contained in:
@@ -39,6 +39,34 @@ celery -A config worker -B -l debug
|
||||
pytest --cov
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
### Descarga
|
||||
|
||||
```bash
|
||||
docker pull ghcr.io/pablo-moreno/shoppy
|
||||
```
|
||||
|
||||
### Construir imagen
|
||||
|
||||
```bash
|
||||
docker build -t shoppy .
|
||||
```
|
||||
|
||||
### Crear contenedor
|
||||
|
||||
**API**
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 8000:80 -e RUN_SERVER=TRUE --env-file=.env shoppy_api
|
||||
```
|
||||
|
||||
**Tareas en segundo plano**
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 8000:80 -e RUN_CELERY=TRUE --env-file=.env shoppy_tasks
|
||||
```
|
||||
|
||||
## Variables de entorno
|
||||
|
||||
Puedes crear un archivo `.env` con las siguientes variables de entorno.
|
||||
@@ -66,25 +94,3 @@ Puedes crear un archivo `.env` con las siguientes variables de entorno.
|
||||
| REDSYS_TERMINAL | 001 | Terminal de Redsys |
|
||||
| REDSYS_CURRENCY_CODE | 978 | Código de moneda de Redsys |
|
||||
| REDSYS_TPV_DOMAIN | | Dominio del TPV para redirección de Redsys |
|
||||
|
||||
## Docker
|
||||
|
||||
### Construir imagen
|
||||
|
||||
```bash
|
||||
docker build -t shoppy .
|
||||
```
|
||||
|
||||
### Crear contenedor
|
||||
|
||||
**API**
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 8000:80 -e RUN_SERVER=TRUE --env-file=.env shoppy_api
|
||||
```
|
||||
|
||||
**Tareas en segundo plano**
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 8000:80 -e RUN_CELERY=TRUE --env-file=.env shoppy_tasks
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user