-
Notifications
You must be signed in to change notification settings - Fork 0
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
1a2b64f
commit 934fbcf
Showing
8 changed files
with
100 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Dockerfile for FastAPI backend | ||
|
||
FROM python:3.12-slim | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN apt-get update && apt-get install -y gcc | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
COPY . . | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 8000 | ||
|
||
# Command to run the app | ||
CMD ["uvicorn", "main: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Dockerfile for Svelte frontend | ||
|
||
FROM node:16 | ||
WORKDIR /app | ||
COPY frontend/package*.json ./ | ||
RUN npm install | ||
COPY frontend . | ||
# No need to run the build step for development | ||
# RUN npm run build | ||
|
||
# Expose the port the dev server runs on | ||
EXPOSE 5173 | ||
|
||
# Command to run the app in development mode | ||
CMD ["npm", "run", "dev", "--", "--host"] |
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 @@ | ||
version: '3.12' | ||
|
||
networks: | ||
kcx-network: | ||
driver: bridge | ||
|
||
services: | ||
backend: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.backend | ||
env_file: | ||
- .env | ||
ports: | ||
- "8000:8000" | ||
depends_on: | ||
- db-redis | ||
- db-sqlite3 | ||
networks: | ||
- kcx-network | ||
|
||
frontend: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.frontend | ||
ports: | ||
- "3000:3000" | ||
- "5173:5173" | ||
depends_on: | ||
- backend | ||
environment: | ||
VITE_BASE_URL: "http://backend:8000" | ||
networks: | ||
- kcx-network | ||
|
||
db-redis: | ||
image: "redis:alpine" | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- kcx-network | ||
|
||
db-sqlite3: | ||
image: "nouchka/sqlite3" | ||
volumes: | ||
- ./data:/data | ||
environment: | ||
SQLITE_DATABASE: "kcx.db" | ||
ports: | ||
- "8080:8080" | ||
networks: | ||
- kcx-network |
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
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,6 +1,9 @@ | ||
fastapi==0.111.0 | ||
pydantic==2.7.1 | ||
pydantic==2.7.2 | ||
PyJWT==2.8.0 | ||
python-dotenv==1.0.1 | ||
python_bcrypt==0.3.2 | ||
bcrypt==4.1.2 | ||
redis==5.0.4 | ||
Requests==2.32.3 | ||
rich==13.7.1 | ||
SQLAlchemy==2.0.29 |