Skip to content

Commit

Permalink
feat: deploy docker backend on fly.io (#12)
Browse files Browse the repository at this point in the history
* feat: vercel analytics

* feat:fly.io

* feat: dockerfile
  • Loading branch information
cs50victor authored Mar 2, 2024
1 parent b57ff50 commit 3d3c902
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*
!server/**.py
!server/**.py
!requirements.txt
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.1
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

ARG PYTHON_VERSION=3.11.6
ARG PYTHON_VERSION=3.12.1
FROM python:${PYTHON_VERSION}-slim as base

# Prevents Python from writing pyc files.
Expand All @@ -27,10 +27,11 @@ RUN adduser \
# Copy the source code into the container.
COPY . .

RUN python -m pip install -r requirements.txt
RUN pip install -r requirements.txt
RUN pip install supabase

# Switch to the non-privileged user to run the application.
USER appuser

# Run the application.
CMD python agent.py start
CMD python server/agent.py start
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Buildspace AI

`find and be found.`

a more detailed docs coming soon.
a more detailed docs coming soon.

## setup for mac

Expand Down
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Analytics } from '@vercel/analytics/react';
import type { Metadata } from 'next';
import { Inter, Roboto } from 'next/font/google';

Expand Down Expand Up @@ -34,6 +35,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
>
<body className="w-full h-full">
{children}
<Analytics />
<TailwindIndicator />
</body>
</html>
Expand Down
23 changes: 23 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# fly.toml app configuration file generated for buildspace on 2024-03-01T19:57:23-05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'buildspace'
primary_region = 'iad'

[build]
dockerfile = 'Dockerfile'

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@radix-ui/react-menubar": "^1.0.4",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@vercel/analytics": "^1.2.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"framer-motion": "^11.0.5",
Expand Down
23 changes: 23 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 6 additions & 43 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,8 @@
aiohttp==3.9.3
aiosignal==1.3.1
annotated-types==0.6.0
anyio==4.3.0
attrs==23.2.0
certifi==2024.2.2
click==8.1.7
deprecation==2.1.0
distro==1.9.0
frozenlist==1.4.1
gotrue==2.4.1
h11==0.14.0
httpcore==1.0.4
httpx==0.25.2
idna==3.6
livekit==0.9.1
livekit-agents==0.4.0
livekit-api==0.4.2
livekit-plugins-deepgram==0.2.0
livekit-plugins-elevenlabs==0.2.0
livekit-protocol==0.3.1
multidict==6.0.5
openai==1.12.0
packaging==23.2
postgrest==0.16.1
protobuf==4.25.3
pydantic==2.6.2
pydantic_core==2.16.3
PyJWT==2.8.0
python-dateutil==2.9.0
livekit_agents==0.4.0
livekit_api==0.4.2
livekit_plugins_deepgram==0.2.0
livekit_plugins_elevenlabs==0.2.0
livekit_protocol==0.3.1
openai==1.13.3
python-dotenv==1.0.1
realtime==1.0.2
setuptools==68.2.2
six==1.16.0
sniffio==1.3.0
storage3==0.7.0
StrEnum==0.4.15
supabase==2.4.0
supafunc==0.3.3
tqdm==4.66.2
types-protobuf==4.24.0.20240129
typing_extensions==4.9.0
websockets==11.0.3
wheel==0.41.2
yarl==1.9.4

0 comments on commit 3d3c902

Please sign in to comment.