Skip to content

Commit ec258f7

Browse files
committed
Use a dockerignore so not all files are copied into image
1 parent 9f31431 commit ec258f7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Exclude everything
2+
*
3+
4+
# Make exceptions for what's needed
5+
!api
6+
!pyproject.toml
7+
!main-requirements.txt
8+
!LICENSE
9+
!alembic.ini
10+
!migrations

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ USER codejam_management
1919
ARG uvicorn_extras=""
2020
ENV uvicorn_extras=$uvicorn_extras
2121

22+
COPY . .
2223
ENTRYPOINT ["/bin/bash", "-c"]
2324
CMD ["alembic upgrade head && uvicorn api.main:app --host 0.0.0.0 --port 80 $uvicorn_extras"]

0 commit comments

Comments
 (0)