File tree Expand file tree Collapse file tree 9 files changed +60
-4
lines changed
Expand file tree Collapse file tree 9 files changed +60
-4
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ ENV ASPNETCORE_URLS="http://+:8080" \
2222# Copy published output
2323COPY --from=build /app/publish ./
2424
25+ # Copy Docker-specific configuration files to replace defaults
26+ COPY API/OCM.Net/OCM.API.Web/App.docker.config ./App.Config
27+ COPY API/OCM.Net/OCM.API.Web/appsettings.docker.json ./appsettings.json
28+
2529# Create non-root user (compatible with Debian-based images)
2630RUN groupadd -r appuser && useradd -r -g appuser appuser \
2731 && chown -R appuser:appuser /app
Original file line number Diff line number Diff line change 1+ {
2+ "Logging" : {
3+ "LogLevel" : {
4+ "Default" : " Debug" ,
5+ "System" : " Information" ,
6+ "Microsoft" : " Information"
7+ }
8+ }
9+ }
Original file line number Diff line number Diff line change 88 },
99 "AllowedHosts" : " *" ,
1010 "CoreSettings" : {
11- "CachePath" : " C: \\ Temp \\ OCM \\ " ,
11+ "CachePath" : " /tmp " ,
1212 "EnableDataWrites" : " true" ,
13+ "IsCacheOnlyMode" : " false" ,
14+ "RefreshCacheOnLoad" : " true" ,
1315 "MongoDBSettings" : {
1416 "ConnectionString" : " mongodb://localhost:27017" ,
1517 "DatabaseName" : " ocm_mirror" ,
1921 "MapQuestOpenAPIKey" : " Mapquest Key" ,
2022 "OsmAPIKey" : " OSM Key"
2123 },
22- "GeolocationShapefilePath" : " Shapefiles\\ World"
24+ "GeolocationShapefilePath" : " Shapefiles/ World"
2325 }
2426
2527}
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ ENV DOTNET_RUNNING_IN_CONTAINER=true
2424# Copy published output from build stage
2525COPY --from=build /app/publish ./
2626
27+ # Copy Docker-specific configuration files to replace defaults
28+ COPY Website/OCM.Web/App.docker.config ./App.Config
29+ COPY Website/OCM.Web/appsettings.docker.json ./appsettings.json
30+
2731# Create a non-root user and give ownership of the app folder
2832RUN groupadd -r appuser && useradd -r -g appuser appuser \
2933 && chown -R appuser:appuser /app
Original file line number Diff line number Diff line change 3636 </ItemGroup >
3737
3838 <ItemGroup >
39+ <Content Update =" App.docker.config" >
40+ <TransformOnBuild >true</TransformOnBuild >
41+ <CopyToOutputDirectory >Never</CopyToOutputDirectory >
42+ </Content >
3943 <Content Update =" App.config" >
4044 <TransformOnBuild >true</TransformOnBuild >
4145 <CopyToOutputDirectory >Never</CopyToOutputDirectory >
Original file line number Diff line number Diff line change 1+ {
2+ "Logging" : {
3+ "LogLevel" : {
4+ "Default" : " Debug" ,
5+ "System" : " Information" ,
6+ "Microsoft" : " Information"
7+ }
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "Logging" : {
3+ "LogLevel" : {
4+ "Default" : " Information" ,
5+ "Microsoft" : " Warning" ,
6+ "Microsoft.Hosting.Lifetime" : " Information"
7+ }
8+ },
9+ "AllowedHosts" : " *" ,
10+ "CoreSettings" : {
11+ "CachePath" : " /tmp" ,
12+ "EnableDataWrites" : " true" ,
13+ "MongoDBSettings" : {
14+ "ConnectionString" : " mongodb://mongodb:27017" ,
15+ "DatabaseName" : " ocm_mirror" ,
16+ "MaxCacheAgeMinutes" : " 1000"
17+ },
18+ "APIKeys" : {
19+ "MapQuestOpenAPIKey" : " Mapquest Key" ,
20+ "OsmAPIKey" : " OSM Key"
21+ }
22+ }
23+
24+ }
Original file line number Diff line number Diff line change 88 },
99 "AllowedHosts" : " *" ,
1010 "CoreSettings" : {
11- "CachePath" : " C: \\ Temp \\ OCM \\ " ,
11+ "CachePath" : " /tmp " ,
1212 "EnableDataWrites" : " true" ,
1313 "MongoDBSettings" : {
1414 "ConnectionString" : " mongodb://localhost:27017" ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ services:
3939 image : mongodb/mongodb-community-server:latest # Or a specific version like 6.0
4040 container_name : mongodb
4141 ports :
42- - " 27018 :27017" # Map host port 27017 to container port 27017
42+ - " 27017 :27017" # Map host port 27017 to container port 27017
4343 volumes :
4444 - mongodb_data:/data/db # Persist data outside the container
4545 restart : unless-stopped # Restart the container unless manually stopped
You can’t perform that action at this time.
0 commit comments