-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"python.pythonPath": "/Users/hongee/Envs/kerckhoff-C7DUdSyH/bin/python", | ||
"python.linting.enabled": true, | ||
"python.linting.pylintEnabled": false, | ||
"python.linting.mypyEnabled": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
# Stage 0 - Node build | ||
FROM node:8 | ||
WORKDIR /kerckhoff | ||
ENV DEBUG False | ||
ADD package.json package-lock.json /kerckhoff/ | ||
RUN npm i | ||
COPY ./webpack.config.js ./jsconfig.json ./ | ||
COPY ./kerckhoff/assets ./kerckhoff/assets | ||
RUN npm run build | ||
|
||
# Stage 1 - Python dependencies | ||
FROM python:3-slim | ||
ENV PYTHONUNBUFFERED 1 | ||
RUN mkdir /kerckhoff | ||
|
||
RUN apt-get update && apt-get install -y curl \ | ||
git \ | ||
build-essential | ||
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash | ||
RUN apt-get install -y nodejs | ||
|
||
WORKDIR /kerckhoff | ||
|
||
ADD requirements.txt /kerckhoff/ | ||
RUN pip install -r requirements.txt | ||
|
||
ADD package.json package-lock.json /kerckhoff/ | ||
RUN npm install | ||
# Get the webpack built assets from the previous stage | ||
COPY --from=0 /kerckhoff /kerckhoff | ||
|
||
ADD . /kerckhoff/ | ||
EXPOSE 5000 | ||
|
||
ENTRYPOINT [ "./prod-entrypoint.sh" ] | ||
CMD "./prod.sh" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import axios from "axios"; | ||
import Cookies from "js-cookie"; | ||
|
||
axios.defaults.xsrfHeaderName = "X-CSRFToken"; | ||
axios.defaults.xsrfCookieName = "csrftoken"; | ||
|
||
const utils = { | ||
getCSRFToken: () => { | ||
return Cookies.get("csrftoken"); | ||
}, | ||
|
||
asFormData: obj => { | ||
Object.keys(obj).reduce((formData, key) => { | ||
formData.append(key, obj[key]); | ||
return formData; | ||
}, new FormData()); | ||
} | ||
}; | ||
|
||
export { utils, axios }; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/sh | ||
cd kerckhoff | ||
gunicorn -b 0.0.0.0:5000 -w 4 -k gthread --threads 2 kerckhoff.wsgi --log-file - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters