Dockerizing

main
Elijah Lucian 3 years ago
parent a2323321e3
commit a891fa6a50
  1. 19
      .vscode/settings.json
  2. 15
      README.md
  3. 22
      docker-compose.yml
  4. 1
      frontend/.dockerignore
  5. 19
      frontend/.vscode/settings.json
  6. 9
      frontend/Dockerfile
  7. 9
      server/Dockerfile
  8. 2
      server/setup.sh

@ -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"
}

@ -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
# 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)
- serve static index (prod)

@ -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"]

@ -0,0 +1 @@
node_modules

@ -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"
}

@ -0,0 +1,9 @@
FROM node:14
WORKDIR /usr/src/frontend
COPY . .
RUN npm i
EXPOSE 3000

@ -0,0 +1,9 @@
FROM python:3
WORKDIR /usr/src/server
COPY . .
RUN pip install -r requirements.txt
EXPOSE 8000

@ -0,0 +1,2 @@
python manage.py migrate
python manage.py createsuperuser --email admin@example.com --username admin
Loading…
Cancel
Save