diff --git a/.dockerignore b/.dockerignore index 62623fd..35b189b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,17 +1,21 @@ -**/.git -**/.vs -**/.idea -**/.vscode +# Keep the backend build context as small and predictable as possible. +# The backend Docker build uses the repo root as its context, so exclude +# everything first and then opt back into only the source folders it needs. +* +!JobTrackerApi/ +!Data/ +!Models/ +!.dockerignore -**/bin -**/obj -**/bin_build +# Include the source trees. +!JobTrackerApi/** +!Data/** +!Models/** -**/*.db -**/*.db-* - -job-tracker-ui/node_modules -job-tracker-ui/build - -**/node_modules -**/npm-debug.log +# Re-exclude generated and local data inside the backend project. +JobTrackerApi/bin/ +JobTrackerApi/obj/ +JobTrackerApi/bin_build/ +JobTrackerApi/Attachments/ +JobTrackerApi/*.db +JobTrackerApi/*.db-* diff --git a/.gitignore b/.gitignore index 1dbe6c6..7d6fb24 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ __pycache__/ # .NET / Visual Studio bin/ obj/ +bin_build/ .vs/ *.user *.suo @@ -39,3 +40,8 @@ coverage/ temp_job.json temp_post_job.py todo jobtracker.txt + +# Local app data +*.db +*.db-* +Attachments/ diff --git a/docker-compose.yml b/docker-compose.yml index 181ee91..9299d58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.9" - services: backend: @@ -64,4 +62,3 @@ services: volumes: jobtracker_data: -