Skip to content

Commit

Permalink
build: improve docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
windsnow1025 committed Oct 13, 2024
1 parent 6d3a5ef commit beb9ac6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions fastapi/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
__pycache__
test
.env
2 changes: 1 addition & 1 deletion fastapi/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea
__pycache__
.env
*.env.json
http-client.private.env.json
8 changes: 3 additions & 5 deletions fastapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ FROM python:3.12

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt
COPY requirements.txt ./

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt

COPY ./app /code/app
COPY ./resources /code/resources
COPY ./chat /code/chat
COPY . .

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
1 change: 1 addition & 0 deletions nest/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.run
dist
node_modules
test
Expand Down
8 changes: 2 additions & 6 deletions next/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Dockerfile
.dockerignore
node_modules
npm-debug.log
README.md
.idea
.next
.git
node_modules

0 comments on commit beb9ac6

Please sign in to comment.