-
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
1 parent
449b4b6
commit e3070e9
Showing
44 changed files
with
54 additions
and
41 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FROM python:3.8-buster | ||
|
||
# Install fonts | ||
ADD https://f1.srnd.org/fonts/posters-1.zip /fonts.zip | ||
RUN apt-get install -y unzip \ | ||
&& unzip /fonts.zip -d /usr/share/fonts \ | ||
&& fc-cache -f | ||
|
||
# Install Inkscape | ||
RUN apt-get update \ | ||
&& apt-get -y install inkscape | ||
|
||
# Install Node | ||
RUN mkdir /node | ||
WORKDIR /node | ||
ENV NODE_VERSION 8.17.0 | ||
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ | ||
&& case "${dpkgArch##*-}" in \ | ||
amd64) ARCH='x64';; \ | ||
ppc64el) ARCH='ppc64le';; \ | ||
s390x) ARCH='s390x';; \ | ||
arm64) ARCH='arm64';; \ | ||
armhf) ARCH='armv7l';; \ | ||
i386) ARCH='x86';; \ | ||
*) echo "unsupported architecture"; exit 1 ;; \ | ||
esac \ | ||
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ | ||
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner | ||
|
||
# Copy the app files | ||
COPY ./api /app | ||
COPY ./frontend /frontend | ||
|
||
# Build and install the frontend | ||
WORKDIR /frontend | ||
RUN npm install \ | ||
&& npm run build \ | ||
&& cp -rf /frontend/build /app | ||
|
||
# Install the python app | ||
WORKDIR /app | ||
RUN pip install -r requirements.txt | ||
|
||
# Cleanup | ||
RUN rm -rf /usr/local/bin/node \ | ||
&& rm -rf /usr/local/bin/npm \ | ||
&& rm -rf /node \ | ||
&& rm -rf /frontend | ||
|
||
WORKDIR /app | ||
EXPOSE 8000 | ||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |
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
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.