django-template/README.md

89 lines
934 B
Markdown
Raw Normal View History

2021-04-01 09:48:35 +02:00
# Install
2021-07-01 09:46:33 +02:00
``` sh
make docker.recreate.django
make run.loaddata
make run.server
```
Now open:
2021-04-01 09:48:35 +02:00
2022-06-27 14:28:40 +02:00
`http://ccstech.localhost`
2021-04-01 09:48:35 +02:00
## Gulp
```shell
npm i
```
Run.
```shell
gulp dev
```
2021-07-01 09:46:33 +02:00
## Tools
Lint
```shell
make lint
2021-04-01 09:48:35 +02:00
```
2021-07-01 09:46:33 +02:00
Formatear
2021-04-01 09:48:35 +02:00
2021-07-01 09:46:33 +02:00
```shell
make format
2021-04-01 09:48:35 +02:00
```
2021-07-01 09:46:33 +02:00
Recrear imagen de Django
2021-04-01 09:48:35 +02:00
2021-07-01 09:46:33 +02:00
```shell
make docker.recreate.django
2021-04-01 09:48:35 +02:00
```
2021-07-01 09:46:33 +02:00
Hacer una nueva migración después de cambiar un model.
2021-04-01 09:48:35 +02:00
2021-07-01 09:46:33 +02:00
```shell
make makemigrations
```
Migrar
```shell
make run.migrate
```
Cargar data mínima.
```shell
make run.loaddata
```
Generar data de desarrollo.
```shell
make run.loaddata.test
```
2021-04-01 09:48:35 +02:00
2021-07-01 09:46:33 +02:00
## Other domains
2021-04-01 09:48:35 +02:00
2022-06-27 14:28:40 +02:00
- Caddy: `http://ccstech.localhost`.
- Gulp: `http://ccstech.localhost:3000`.
- Django: `http://ccstech.localhost:8000`.
- Mailhog: `http://ccstech.localhost:8025`.
2021-04-01 09:48:35 +02:00
### Bash Django
``` shell
2022-06-27 14:28:40 +02:00
docker exec -it ccstech_django_1 bash
2021-04-01 09:48:35 +02:00
```
# Run production
``` sh
2021-04-01 09:58:13 +02:00
docker-compose -f docker-compose.pro.yaml up
2021-04-01 09:48:35 +02:00
```
2022-06-27 14:28:40 +02:00
Open `https://ccstech.io`.