-
Notifications
You must be signed in to change notification settings - Fork 28
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
1 parent
181e405
commit 5efd73c
Showing
76 changed files
with
10,595 additions
and
5,798 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
# build environment | ||
FROM node:12-alpine as builder | ||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
COPY ui/package.json /app/package.json | ||
RUN npm install | ||
COPY ui /app | ||
|
||
RUN npm run build | ||
|
||
# production environment | ||
FROM python:3.7-slim | ||
ENV PYTHONUNBUFFERED=1 | ||
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends | ||
WORKDIR /code | ||
COPY api/requirements.txt /code/ | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
COPY api /code/ | ||
COPY --from=builder /app/build /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/sites-available/default | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
RUN chmod +x /code/start_server.sh | ||
RUN chown -R www-data:www-data /code | ||
EXPOSE 80 | ||
STOPSIGNAL SIGTERM | ||
CMD ["/code/start_server.sh"] | ||
# build environment | ||
FROM node:10-alpine as builder | ||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
COPY ui/package.json /app/package.json | ||
RUN npm install | ||
RUN npm i react-router-dom | ||
COPY ui /app | ||
|
||
RUN npm run build | ||
|
||
# production environment | ||
FROM python:3.7-slim | ||
ENV PYTHONUNBUFFERED=1 | ||
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends | ||
WORKDIR /code | ||
COPY api/requirements.txt /code/ | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
COPY api /code/ | ||
COPY --from=builder /app/build /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/sites-available/default | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
RUN chmod +x /code/start_server.sh | ||
RUN chown -R www-data:www-data /code | ||
EXPOSE 80 | ||
STOPSIGNAL SIGTERM | ||
CMD ["/code/start_server.sh"] |
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,10 +1,14 @@ | ||
# production environment | ||
FROM python:3.7-slim | ||
ENV PYTHONUNBUFFERED=1 | ||
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends | ||
WORKDIR /code | ||
COPY requirements.txt /code/ | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
EXPOSE 8000 | ||
STOPSIGNAL SIGTERM | ||
CMD ["/code/start_server.dev.sh"] | ||
# production environment | ||
FROM python:3.7-slim | ||
ENV PYTHONUNBUFFERED=1 | ||
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends | ||
RUN apt-get install -y apt-transport-https ca-certificates curl lsof | ||
RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | ||
RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list | ||
RUN apt-get update && apt-get install -y kubectl | ||
WORKDIR /code | ||
COPY requirements.txt /code/ | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
EXPOSE 8000 | ||
STOPSIGNAL SIGTERM | ||
CMD ["/code/start_server.dev.sh"] |
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
Oops, something went wrong.