-
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.
Add Dockerfile.prod + change in compose
- Loading branch information
1 parent
c8162c3
commit 326a1e3
Showing
3 changed files
with
36 additions
and
2 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,21 @@ | ||
FROM python:3.12-slim | ||
|
||
# Update and install dependencies | ||
RUN apt-get update \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR / | ||
|
||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY /app/ /app/ | ||
|
||
ENV FASTAPI_HASH_ALGORITHM=HS256 | ||
ENV ACCESS_TOKEN_EXPIRE_MINUTES=30 | ||
ENV USER_DB_URL=sqlite:///./sql_app.db | ||
ENV FILE_DB_URL=sqlite:///./file_sql.db | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] |
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,13 @@ | ||
FROM node:slim | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["npm", "run", "dev"] |