diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a33d2a5 --- /dev/null +++ b/.vscode/settings.json @@ -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" +} \ No newline at end of file diff --git a/README.md b/README.md index 1a1cb90..fb2b5e3 100644 --- a/README.md +++ b/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 +# 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) \ No newline at end of file +- serve static index (prod) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bc66904 --- /dev/null +++ b/docker-compose.yml @@ -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"] diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json new file mode 100644 index 0000000..f24657c --- /dev/null +++ b/frontend/.vscode/settings.json @@ -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" +} \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..c46f3ba --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,9 @@ +FROM node:14 + +WORKDIR /usr/src/frontend +COPY . . + +RUN npm i + +EXPOSE 3000 + diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..21cca3a --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3 + +WORKDIR /usr/src/server + +COPY . . + +RUN pip install -r requirements.txt + +EXPOSE 8000 \ No newline at end of file diff --git a/server/setup.sh b/server/setup.sh new file mode 100755 index 0000000..2afe26a --- /dev/null +++ b/server/setup.sh @@ -0,0 +1,2 @@ +python manage.py migrate +python manage.py createsuperuser --email admin@example.com --username admin \ No newline at end of file