Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dockerfiles for Frontend & Backend #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# base image

FROM python:3.9.4

RUN pip install django

# set working directory
WORKDIR /app

# copy and install requirements
COPY requirements.txt .
#RUN pip install -r requirements.txt

# copy the rest of the application code
COPY . .
EXPOSE 8000
# start the application
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
2 changes: 1 addition & 1 deletion backend/mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]


# Application definition
Expand Down
141 changes: 126 additions & 15 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,126 @@
asgiref==3.2.5
certifi==2019.11.28
chardet==3.0.4
coreschema==0.0.4
Django==3.1.8
djangorestframework==3.11.2
idna==2.9
itypes==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
pytz==2019.3
requests==2.23.0
sqlparse==0.3.1
uritemplate==3.0.1
urllib3==1.25.8
aiofiles==22.1.0
aiosqlite==0.18.0
anyio==3.6.2
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asgiref==3.6.0
asttokens==2.2.1
attrs==22.2.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.11.2
bleach==6.0.0
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
colorama==0.4.6
comm==0.1.2
contourpy==1.0.7
cycler==0.11.0
debugpy==1.6.6
decorator==5.1.1
defusedxml==0.7.1
Django==4.1.7
djangorestframework==3.14.0
executing==1.2.0
fastjsonschema==2.16.3
fonttools==4.39.0
fqdn==1.5.1
gitdb==4.0.10
GitPython==3.1.31
idna==3.4
ipykernel==6.21.3
ipython==8.11.0
ipython-genutils==0.2.0
isoduration==20.11.0
jedi==0.18.2
Jinja2==3.1.2
joblib==1.2.0
json5==0.9.11
jsonpointer==2.3
jsonschema==4.17.3
jupyter-events==0.6.3
jupyter-server-mathjax==0.2.6
jupyter-ydoc==0.2.3
jupyter_client==8.0.3
jupyter_core==5.2.0
jupyter_server==2.4.0
jupyter_server_fileid==0.8.0
jupyter_server_terminals==0.4.4
jupyter_server_ydoc==0.6.1
jupyterlab==3.6.1
jupyterlab-git==0.41.0
jupyterlab-pygments==0.2.2
jupyterlab_server==2.20.0
kiwisolver==1.4.4
MarkupSafe==2.1.2
matplotlib==3.7.1
matplotlib-inline==0.1.6
mistune==2.0.5
nbclassic==0.5.3
nbclient==0.7.2
nbconvert==7.2.9
nbdime==3.1.1
nbformat==5.7.3
nest-asyncio==1.5.6
notebook==6.5.3
notebook_shim==0.2.2
numpy==1.24.2
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
packaging==23.0
pandas==1.5.3
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.4.0
platformdirs==3.1.1
plotly==5.13.1
prometheus-client==0.16.0
prompt-toolkit==3.0.38
psutil==5.9.4
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.14.0
pyparsing==3.0.9
pyrsistent==0.19.3
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2022.7.1
PyYAML==6.0
pyzmq==25.0.1
requests==2.28.2
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
scikit-learn==1.2.2
scipy==1.10.1
seaborn==0.12.2
Send2Trash==1.8.0
six==1.16.0
smmap==5.0.0
sniffio==1.3.0
soupsieve==2.4
sqlparse==0.4.3
stack-data==0.6.2
tenacity==8.2.2
terminado==0.17.1
threadpoolctl==3.1.0
tinycss2==1.2.1
tomli==2.0.1
torch==1.13.1
tornado==6.2
traitlets==5.9.0
typing_extensions==4.5.0
uri-template==1.2.0
urllib3==1.26.15
wcwidth==0.2.6
webcolors==1.12
webencodings==0.5.1
websocket-client==1.5.1
y-py==0.5.9
ypy-websocket==0.8.2
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
frontend:
build: ./frontend
ports:
- '3000:3000'

backend:
build: ./backend
ports:
- '8000:8000'
22 changes: 22 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# base image
FROM node:14

# set working directory
WORKDIR /app

# copy package.json and package-lock.json
COPY package*.json ./

# install dependencies
RUN npm install

# copy the rest of the application code
COPY . .

EXPOSE 3000

# build the application
#RUN npm run build

# start the application
CMD ["npm", "start"]
24 changes: 24 additions & 0 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"files": {
"main.css": "/static/css/main.512deafe.chunk.css",
"main.js": "/static/js/main.64bb1a16.chunk.js",
"main.js.map": "/static/js/main.64bb1a16.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.81534a39.js",
"runtime-main.js.map": "/static/js/runtime-main.81534a39.js.map",
"static/js/2.96791f06.chunk.js": "/static/js/2.96791f06.chunk.js",
"static/js/2.96791f06.chunk.js.map": "/static/js/2.96791f06.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.3ba041dc78f0bca7add54096f59999ec.js": "/precache-manifest.3ba041dc78f0bca7add54096f59999ec.js",
"service-worker.js": "/service-worker.js",
"static/css/main.512deafe.chunk.css.map": "/static/css/main.512deafe.chunk.css.map",
"static/js/2.96791f06.chunk.js.LICENSE.txt": "/static/js/2.96791f06.chunk.js.LICENSE.txt",
"static/js/main.64bb1a16.chunk.js.LICENSE.txt": "/static/js/main.64bb1a16.chunk.js.LICENSE.txt",
"static/media/App.css": "/static/media/showcase.4b31330b.jpg"
},
"entrypoints": [
"static/js/runtime-main.81534a39.js",
"static/js/2.96791f06.chunk.js",
"static/css/main.512deafe.chunk.css",
"static/js/main.64bb1a16.chunk.js"
]
}
Binary file added frontend/build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Social Network For Developer"/><link rel="manifest" href="/manifest.json"/><script src="https://kit.fontawesome.com/21d0a1216b.js" crossorigin="anonymous"></script><title>DevConnector</title><link href="/static/css/main.512deafe.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,l,i=t[0],f=t[1],a=t[2],p=0,s=[];p<i.length;p++)l=i[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,i=1;i<r.length;i++){var f=r[i];0!==o[f]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var i=this.webpackJsonpclient=this.webpackJsonpclient||[],f=i.push.bind(i);i.push=t,i=i.slice();for(var a=0;a<i.length;a++)t(i[a]);var c=f;r()}([])</script><script src="/static/js/2.96791f06.chunk.js"></script><script src="/static/js/main.64bb1a16.chunk.js"></script></body></html>
15 changes: 15 additions & 0 deletions frontend/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "DevConnector",
"name": "Social Network For Developers",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "3ce23ba21a8f860146ff29f05b2c5e0b",
"url": "/index.html"
},
{
"revision": "ee35316c747180827d51",
"url": "/static/css/main.512deafe.chunk.css"
},
{
"revision": "5c35efecb5c13ec2e489",
"url": "/static/js/2.96791f06.chunk.js"
},
{
"revision": "e8bc063a29551777f3f454d9f8e65466",
"url": "/static/js/2.96791f06.chunk.js.LICENSE.txt"
},
{
"revision": "ee35316c747180827d51",
"url": "/static/js/main.64bb1a16.chunk.js"
},
{
"revision": "4e0e34f265fae8f33b01b27ae29d9d6f",
"url": "/static/js/main.64bb1a16.chunk.js.LICENSE.txt"
},
{
"revision": "05fbb5ed970a924e23b7",
"url": "/static/js/runtime-main.81534a39.js"
},
{
"revision": "4b31330b20e3cff3e49d540e4e7175e2",
"url": "/static/media/showcase.4b31330b.jpg"
}
]);
3 changes: 3 additions & 0 deletions frontend/build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
39 changes: 39 additions & 0 deletions frontend/build/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/

importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/precache-manifest.3ba041dc78f0bca7add54096f59999ec.js"
);

self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});

workbox.core.clientsClaim();

/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});

workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {

blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
});
2 changes: 2 additions & 0 deletions frontend/build/static/css/main.512deafe.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading