Skip to content

Commit a3989b2

Browse files
chore: add compose dev db setup
1 parent 6bbc0c6 commit a3989b2

File tree

8 files changed

+459
-413
lines changed

8 files changed

+459
-413
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
SECRET_KEY=
2+
13
CDN_NAME=
24
CDN_API_KEY=
35
CDN_API_SECRET=

README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,25 @@
33

44
<p align="center">
55
<img alt="django-react-typescript logo" src="assets/Logo.png" />
6-
<p align="center">Your favorite React-Django boilerplate.</p>
6+
<p align="center">Fully-featured, up-to-date React-Django boilerplate with great.</p>
77
</p>
88

99
---
1010

11-
## About
12-
1311
This is a fully-featured Django-React boilerplate built for great development experience and easy deployment.
1412

13+
## Development
14+
15+
### Database
16+
17+
To start developing on this project, you will need a Postgres database instance running. It doesn 't matter if it's a local instance or a remote one. Just make sure to set up a Postgres database and configure the `.env` file with the correct credentials.
18+
19+
For convenience, if you want to use Docker + Docker Compose to spin up a Postgres instance locally, with pgAdmin using alongisde, use the following command:
20+
21+
```sh
22+
pnpm run dev:db:up
23+
```
24+
1525
### Global
1626

1727
- Commit lint rules
@@ -28,12 +38,12 @@ This is a fully-featured Django-React boilerplate built for great development ex
2838
| Other features | Status |
2939
| --------------------------- | ----------- |
3040
| SSR ready | In progress |
31-
| Service workers | ✔️ |
32-
| Gzip static file gen | ✔️ |
33-
| Cache control | ✔️ |
34-
| Code split and lazy loading | ✔️ |
35-
| Google Analytics ready | ✔️ |
36-
| PWA ready | ✔️ |
41+
| Service workers | ✔️ |
42+
| Gzip static file gen | ✔️ |
43+
| Cache control | ✔️ |
44+
| Code split and lazy loading | ✔️ |
45+
| Google Analytics ready | ✔️ |
46+
| PWA ready | ✔️ |
3747

3848
### Backend
3949

@@ -43,8 +53,8 @@ This is a fully-featured Django-React boilerplate built for great development ex
4353

4454
| Other features | Status |
4555
| -------------------- | ------ |
46-
| Token authentication | ✔️ |
47-
| SMTP ready | ✔️ |
56+
| Token authentication | ✔️ |
57+
| SMTP ready | ✔️ |
4858

4959
### Infrastructure
5060

@@ -55,9 +65,9 @@ This is a fully-featured Django-React boilerplate built for great development ex
5565

5666
| Other features | Status |
5767
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
58-
| NGINX config file | ✔️ |
59-
| CI/CD to any V.M. (AWS EC2s, GCloud apps, Digital Ocean droplets, Hostgator VPSs, etc) accessible via SSH (the `hml` and `prd` branches will trigger the [deploy workflow](#Virtualized-Deploy-Workflow)) | ✔️ |
60-
| CI/CD to deploy straight on host (without virtualization; not recommended) (the branch `prd-host` will trigger this. See more on the [host deploy workflow](#Host-Deploy-Workflow) method) | ✔️ |
68+
| NGINX config file | ✔️ |
69+
| CI/CD to any V.M. (AWS EC2s, GCloud apps, Digital Ocean droplets, Hostgator VPSs, etc) accessible via SSH (the `hml` and `prd` branches will trigger the [deploy workflow](#Virtualized-Deploy-Workflow)) | ✔️ |
70+
| CI/CD to deploy straight on host (without virtualization; not recommended) (the branch `prd-host` will trigger this. See more on the [host deploy workflow](#Host-Deploy-Workflow) method) | ✔️ |
6171

6272
### Integrations
6373

core/settings/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858

5959
# Application definition
6060

61-
INSTALLED_APPS = [
62-
'admin_menu',
61+
INSTALLED_APPS = [
62+
'jazzmin',
6363
'django.contrib.admin',
6464
'django.contrib.auth',
6565
'django.contrib.contenttypes',
@@ -81,9 +81,9 @@
8181
# https://github.com/cdrx/django-admin-menu
8282

8383
ADMIN_STYLE = {
84-
'primary-color': '#0C4B33',
85-
'secondary-color': '#44B78B',
86-
'tertiary-color': '#F2F9FC'
84+
'primary-color': '#164B36',
85+
'secondary-color': '#092117',
86+
'tertiary-color': '#51B48E'
8787
}
8888

8989
ADMIN_LOGO = 'backend/logo.png'

docker-compose-dev-db.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "3.8"
2+
services:
3+
postgres:
4+
container_name: container-pg
5+
image: postgres
6+
hostname: localhost
7+
ports:
8+
- "5432:5432"
9+
environment:
10+
POSTGRES_USER: admin
11+
POSTGRES_PASSWORD: root
12+
POSTGRES_DB: dev_db
13+
volumes:
14+
- postgres-data:/var/lib/postgresql/data
15+
restart: unless-stopped
16+
17+
pgadmin:
18+
container_name: container-pgadmin
19+
image: dpage/pgadmin4
20+
depends_on:
21+
- postgres
22+
ports:
23+
- "5050:80"
24+
environment:
25+
PGADMIN_DEFAULT_EMAIL: admin@admin.com
26+
PGADMIN_DEFAULT_PASSWORD: root
27+
restart: unless-stopped
28+
29+
volumes:
30+
postgres-data:

0 commit comments

Comments
 (0)