-
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.
Merge pull request #47 from CSSE6400/dev
Dev
- Loading branch information
Showing
61 changed files
with
2,378 additions
and
1,132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,3 +275,5 @@ application/data/ | |
|
||
application/app/frontend/node_modules/ | ||
node_modules | ||
aws/ | ||
api.txt |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 +1,3 @@ | ||
__pycache__/ | ||
__pycache__/ | ||
frontend/build/ | ||
frontend/node_modules/ |
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,19 +1,34 @@ | ||
FROM pypy:3.9-slim | ||
|
||
# Installing dependencies for running a python application | ||
# Installing dependencies for running the application | ||
RUN apt-get update && apt-get install -y libpq-dev postgresql-common gcc libgeos++-dev libgeos-3.9.0 libgeos-c1v5 libgeos-dev libgeos-doc | ||
RUN apt-get install -y openssl libcurl4-nss-dev libssl-dev curl | ||
|
||
# Install NVM to manage installing npm 20 and Yarn | ||
ENV NVM_DIR "$HOME/.nvm" | ||
RUN mkdir -p ${NVM_DIR} | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | ||
RUN /bin/bash -c "source ~/.bashrc && nvm install 20 && npm install --global yarn" | ||
|
||
# Setting the working directory | ||
WORKDIR /app | ||
|
||
RUN pypy3 -m pip install --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 numpy | ||
|
||
# Install pipenv dependencies | ||
# Install pipenv dependencies (Uses some separate precompiled wheels to avoid compiling) | ||
RUN pypy3 -m pip install --prefer-binary --extra-index-url https://pypy.kmtea.eu/simple pycurl==7.43.0 numpy | ||
COPY requirements.txt ./ | ||
RUN pip install -r requirements.txt | ||
RUN pypy3 -m pip install -r requirements.txt | ||
|
||
# Copy our AWS credentials and construct an entrypoint script to source them | ||
COPY credentials ./ | ||
RUN printf '#!/bin/sh\n. ./credentials\nexec "$@"' > entrypoint.sh | ||
RUN chmod +x entrypoint.sh | ||
|
||
# Copying our application into the container | ||
COPY app /app | ||
|
||
# Running our application | ||
# Build the frontend with yarn | ||
RUN /bin/bash -c "source ~/.bashrc && cd frontend && yarn install && yarn build" | ||
|
||
# Running our application + entrypoint script | ||
ENTRYPOINT ["./entrypoint.sh"] | ||
CMD ["gunicorn", "--config", "gunicorn_config.py", "wsgi:app", "--preload"] |
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.