summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-10-30 12:30:09 +0100
committerPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-10-30 12:30:09 +0100
commit141402fdf7b4d49a012204f4418c74e48e26152f (patch)
tree254844b33c4c08478fd16108a63b4a4981b9a922
parentb7e09de3cb8709e5456b996984b5de8161202ef6 (diff)
Improve docker config
-rw-r--r--backend/Elements.Backend/Directory.build.props18
-rw-r--r--backend/Elements.Data/Directory.build.props18
-rw-r--r--dev.docker-compose.yml4
3 files changed, 36 insertions, 4 deletions
diff --git a/backend/Elements.Backend/Directory.build.props b/backend/Elements.Backend/Directory.build.props
new file mode 100644
index 0000000..cb358fd
--- /dev/null
+++ b/backend/Elements.Backend/Directory.build.props
@@ -0,0 +1,18 @@
+<Project>
+
+ <PropertyGroup>
+ <DefaultItemExcludes>$(DefaultItemExcludes);$(MSBuildProjectDirectory)/obj/**/*</DefaultItemExcludes>
+ <DefaultItemExcludes>$(DefaultItemExcludes);$(MSBuildProjectDirectory)/bin/**/*</DefaultItemExcludes>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(DOTNET_RUNNING_IN_CONTAINER)' == 'true'">
+ <BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/container/</BaseIntermediateOutputPath>
+ <BaseOutputPath>$(MSBuildProjectDirectory)/bin/container/</BaseOutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(DOTNET_RUNNING_IN_CONTAINER)' != 'true'">
+ <BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/local/</BaseIntermediateOutputPath>
+ <BaseOutputPath>$(MSBuildProjectDirectory)/bin/local/</BaseOutputPath>
+ </PropertyGroup>
+
+</Project>
diff --git a/backend/Elements.Data/Directory.build.props b/backend/Elements.Data/Directory.build.props
new file mode 100644
index 0000000..cb358fd
--- /dev/null
+++ b/backend/Elements.Data/Directory.build.props
@@ -0,0 +1,18 @@
+<Project>
+
+ <PropertyGroup>
+ <DefaultItemExcludes>$(DefaultItemExcludes);$(MSBuildProjectDirectory)/obj/**/*</DefaultItemExcludes>
+ <DefaultItemExcludes>$(DefaultItemExcludes);$(MSBuildProjectDirectory)/bin/**/*</DefaultItemExcludes>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(DOTNET_RUNNING_IN_CONTAINER)' == 'true'">
+ <BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/container/</BaseIntermediateOutputPath>
+ <BaseOutputPath>$(MSBuildProjectDirectory)/bin/container/</BaseOutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(DOTNET_RUNNING_IN_CONTAINER)' != 'true'">
+ <BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/local/</BaseIntermediateOutputPath>
+ <BaseOutputPath>$(MSBuildProjectDirectory)/bin/local/</BaseOutputPath>
+ </PropertyGroup>
+
+</Project>
diff --git a/dev.docker-compose.yml b/dev.docker-compose.yml
index eb8791f..13e1771 100644
--- a/dev.docker-compose.yml
+++ b/dev.docker-compose.yml
@@ -23,10 +23,6 @@ services:
- ./backend/elements-backend.sln:/app/elements-backend.sln
- ./backend/Elements.Data:/app/Elements.Data
- ./backend/Elements.Backend:/app/Elements.Backend
- - /app/Elements.Backend/obj
- - /app/Elements.Backend/bin
- - /app/Elements.Data/obj
- - /app/Elements.Data/bin
depends_on:
database:
condition: service_healthy