summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2024-08-26 13:50:42 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2024-08-26 13:50:42 +0300
commita35934439582215f7a726014e954f08692ad910c (patch)
treed5b5e8aa35f9ed86d927ec65f303ccd21823a54a
parent0276a77b32097c7ac3da764515c1ecf858daa342 (diff)
Change port
-rw-r--r--Dockerfile9
-rw-r--r--RhSolutions.Api/Properties/launchSettings.json4
-rw-r--r--docker-compose.yml2
3 files changed, 8 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index 9c9a263..dc5a24b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,9 +4,10 @@ COPY . .
RUN dotnet restore
RUN dotnet publish --property:OutputPath=/app
-FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled
-EXPOSE 5000
+FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
+EXPOSE 8080
WORKDIR /app
COPY --from=build /app .
-ENV ASPNETCORE_ENVIRONMENT Production
-ENTRYPOINT ["./RhSolutions.Api", "--urls=http://0.0.0.0:5000"] \ No newline at end of file
+USER $APP_UID
+
+ENTRYPOINT ["./RhSolutions.Api"] \ No newline at end of file
diff --git a/RhSolutions.Api/Properties/launchSettings.json b/RhSolutions.Api/Properties/launchSettings.json
index 9c800c5..dd9f268 100644
--- a/RhSolutions.Api/Properties/launchSettings.json
+++ b/RhSolutions.Api/Properties/launchSettings.json
@@ -4,7 +4,7 @@
"anonymousAuthentication": true,
"launchBrowser": false,
"iisExpress": {
- "applicationUrl": "http://localhost:5000",
+ "applicationUrl": "http://localhost:8080",
"sslPort": 0
}
},
@@ -13,7 +13,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
- "applicationUrl": "http://localhost:5000",
+ "applicationUrl": "http://localhost:8080",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
diff --git a/docker-compose.yml b/docker-compose.yml
index 2700fd0..ae1faba 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -4,7 +4,7 @@ services:
build: .
container_name: app
ports:
- - 5000:5000
+ - 8080:8080
environment:
- DB_HOST=db
- DB_PORT=5432