Dockerizing
This commit is contained in:
parent
a2323321e3
commit
a891fa6a50
19
.vscode/settings.json
vendored
Normal file
19
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#ab307e",
|
||||
"activityBar.activeBorder": "#25320e",
|
||||
"activityBar.background": "#ab307e",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#25320e",
|
||||
"activityBarBadge.foreground": "#e7e7e7",
|
||||
"statusBar.background": "#832561",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#ab307e",
|
||||
"titleBar.activeBackground": "#832561",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#83256199",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
},
|
||||
"peacock.remoteColor": "#832561"
|
||||
}
|
11
README.md
11
README.md
|
@ -2,14 +2,24 @@
|
|||
|
||||
An MVP boilerplate for a django / react app.
|
||||
|
||||
# Setup
|
||||
|
||||
```
|
||||
python manage.py migrate
|
||||
python manage.py createsuperuser --email admin@example.com --username admin --password whatever
|
||||
```
|
||||
|
||||
# Boilerplate Features
|
||||
|
||||
- Authentication
|
||||
- User Table (username, email, password)
|
||||
|
||||
# Extras
|
||||
|
||||
- dockerized
|
||||
|
||||
# Frontend
|
||||
|
||||
- [x] useGet hook
|
||||
- [x] User context
|
||||
- [x] auth api
|
||||
|
@ -17,6 +27,7 @@ An MVP boilerplate for a django / react app.
|
|||
- [ ] socket hook
|
||||
|
||||
# Backend
|
||||
|
||||
- user CRUD
|
||||
- login / logout / forgot password
|
||||
- serve static index (prod)
|
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
volumes:
|
||||
- ./frontend/src:/usr/src/frontend/src
|
||||
ports:
|
||||
- 3000:3000
|
||||
environment:
|
||||
CHOKIDAR_USEPOLLING: "true"
|
||||
command: ["npm", "run", "start"]
|
||||
|
||||
server:
|
||||
build:
|
||||
context: ./server
|
||||
volumes:
|
||||
- ./server:/usr/src/server
|
||||
ports:
|
||||
- 8000:8000
|
||||
command: ["python", "manage.py", "runserver"]
|
1
frontend/.dockerignore
Normal file
1
frontend/.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules
|
19
frontend/.vscode/settings.json
vendored
Normal file
19
frontend/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#1f6fd0",
|
||||
"activityBar.activeBorder": "#ee90bb",
|
||||
"activityBar.background": "#1f6fd0",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#ee90bb",
|
||||
"activityBarBadge.foreground": "#15202b",
|
||||
"statusBar.background": "#1857a4",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#1f6fd0",
|
||||
"titleBar.activeBackground": "#1857a4",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#1857a499",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
},
|
||||
"peacock.remoteColor": "#1857a4"
|
||||
}
|
9
frontend/Dockerfile
Normal file
9
frontend/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM node:14
|
||||
|
||||
WORKDIR /usr/src/frontend
|
||||
COPY . .
|
||||
|
||||
RUN npm i
|
||||
|
||||
EXPOSE 3000
|
||||
|
9
server/Dockerfile
Normal file
9
server/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM python:3
|
||||
|
||||
WORKDIR /usr/src/server
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
EXPOSE 8000
|
2
server/setup.sh
Executable file
2
server/setup.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
python manage.py migrate
|
||||
python manage.py createsuperuser --email admin@example.com --username admin
|
Loading…
Reference in New Issue
Block a user