-
Notifications
You must be signed in to change notification settings - Fork 2
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 #26 from Helithumper/23-dockerize
Application Dockerized w/ Redis, Freeze requirements
- Loading branch information
Showing
6 changed files
with
149 additions
and
31 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build Docker image | ||
run: docker build . -t onboardlite | ||
|
||
- name: Verify Docker image | ||
run: docker run --rm onboardlite echo "Docker image built successfully!" |
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ clouds.yaml | |
infra_options.json | ||
_deploy.sh | ||
HackUCF.ovpn | ||
config.yml |
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,26 @@ | ||
# Use the official Python base image | ||
FROM python:3.11-bookworm | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the requirements file to the container | ||
COPY requirements.txt . | ||
|
||
# Install build-essential | ||
RUN apt-get update && apt-get install -y build-essential | ||
|
||
# Clean up | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install the dependencies | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the application code to the container | ||
COPY . . | ||
|
||
# Expose the port that the FastAPI application will run on | ||
EXPOSE 8000 | ||
|
||
# Start the FastAPI application | ||
CMD ["uvicorn", "index:app", "--host", "0.0.0.0", "--port", "8000"] |
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,11 @@ | ||
version: '3' | ||
services: | ||
fastapi: | ||
build: . | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- ./config.yml:/app/config/options.yml | ||
|
||
redis: | ||
image: redis:7.2 |
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,76 @@ | ||
requests | ||
fastapi | ||
pydantic==1.10.10 | ||
python-jose | ||
requests_oauthlib | ||
gspread | ||
boto3 | ||
botocore | ||
pre-commit | ||
stripe | ||
uvicorn[standard] | ||
passwordgenerator | ||
python-terraform | ||
airpress | ||
cffi | ||
openstacksdk | ||
asyncio | ||
pyopenssl==22.1.0 | ||
airpress==1.0.3 | ||
anyio==4.3.0 | ||
async-timeout==4.0.3 | ||
asyncio==3.4.3 | ||
black==23.9.1 | ||
jinja2 | ||
commonmark | ||
redis | ||
boto3==1.34.59 | ||
botocore==1.34.59 | ||
cachetools==5.3.3 | ||
certifi==2024.2.2 | ||
cffi==1.16.0 | ||
cfgv==3.4.0 | ||
charset-normalizer==3.3.2 | ||
click==8.1.7 | ||
commonmark==0.9.1 | ||
cryptography==38.0.4 | ||
decorator==5.1.1 | ||
distlib==0.3.8 | ||
dogpile.cache==1.3.2 | ||
ecdsa==0.18.0 | ||
fastapi==0.110.0 | ||
filelock==3.13.1 | ||
google-auth==2.28.2 | ||
google-auth-oauthlib==1.2.0 | ||
gspread==6.0.2 | ||
h11==0.14.0 | ||
httptools==0.6.1 | ||
identify==2.5.35 | ||
idna==3.6 | ||
iso8601==2.1.0 | ||
Jinja2==3.1.3 | ||
jmespath==1.0.1 | ||
jsonpatch==1.33 | ||
jsonpointer==2.4 | ||
keystoneauth1==5.6.0 | ||
MarkupSafe==2.1.5 | ||
mypy-extensions==1.0.0 | ||
netifaces==0.11.0 | ||
nodeenv==1.8.0 | ||
oauthlib==3.2.2 | ||
openstacksdk==3.0.0 | ||
os-service-types==1.7.0 | ||
packaging==23.2 | ||
passwordgenerator==1.5.1 | ||
pathspec==0.12.1 | ||
pbr==6.0.0 | ||
platformdirs==4.2.0 | ||
pre-commit==3.6.2 | ||
pyasn1==0.5.1 | ||
pyasn1-modules==0.3.0 | ||
pycparser==2.21 | ||
pydantic==1.10.10 | ||
pyOpenSSL==22.1.0 | ||
python-dateutil==2.9.0.post0 | ||
python-dotenv==1.0.1 | ||
python-jose==3.3.0 | ||
python-terraform==0.10.1 | ||
PyYAML==6.0.1 | ||
redis==5.0.2 | ||
requests==2.31.0 | ||
requests-oauthlib==1.3.1 | ||
requestsexceptions==1.4.0 | ||
rsa==4.9 | ||
s3transfer==0.10.0 | ||
six==1.16.0 | ||
sniffio==1.3.1 | ||
starlette==0.36.3 | ||
stevedore==5.2.0 | ||
StrEnum==0.4.15 | ||
stripe==8.6.0 | ||
typing_extensions==4.10.0 | ||
urllib3==2.0.7 | ||
uvicorn==0.28.0 | ||
uvloop==0.19.0 | ||
virtualenv==20.25.1 | ||
watchfiles==0.21.0 | ||
websockets==12.0 |