https://github.com/greenteabiscuit/django-react-nginx-mysql-docker
app template for django, react, nginx, to deploy on k8s
https://github.com/greenteabiscuit/django-react-nginx-mysql-docker
django-rest-framework k8s nginx react
Last synced: 7 months ago
JSON representation
app template for django, react, nginx, to deploy on k8s
- Host: GitHub
- URL: https://github.com/greenteabiscuit/django-react-nginx-mysql-docker
- Owner: greenteabiscuit
- Created: 2021-01-02T15:26:49.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-07T05:22:08.000Z (almost 5 years ago)
- Last Synced: 2025-04-01T03:41:33.304Z (9 months ago)
- Topics: django-rest-framework, k8s, nginx, react
- Language: Python
- Homepage:
- Size: 1.93 MB
- Stars: 11
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django-react-nginx-mysql-docker
## Modify the time for wait.sh
Modify the timeout seconds in `frontend/nginx/wait.sh` if the frontend nginx server starts earlier than react. (e.g. 15 -> 120)
```
WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15}
```
## `backend/web-back/.env` just for development
```
SECRET_KEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
DEBUG=False
HOST=db
USER=user
```
## migration for database
```
$ docker-compose run --rm web-back sh -c "python manage.py makemigrations"
$ docker-compose run --rm web-back sh -c "python manage.py migrate"
```
## create superuser
```
docker-compose run --rm web-back sh -c "python manage.py createsuperuser"
```
## add packages
```
docker-compose run --rm web-front sh -c "yarn add next react"
```
## run server
```
docker-compose up --build
```