mirror of
https://github.com/yummy4friends/y4f.git
synced 2025-07-18 09:33:18 +02:00
Feature/docker (#31)
* Add Docker capabilities Changed launchSettings Added Dockerfile && docker-compose with traefik labels * Relocate launchSettings.json * Delete workflows Not needed anymore * Add Docker for WebApi Added docker-compose && Dockerfile * Fix minor mistakes --------- Co-authored-by: ProfessionalUwU <andre.fuhry@hopeless-cloud.xyz>
This commit is contained in:
6
src/WebApi/Dockerfile
Normal file
6
src/WebApi/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0
|
||||
WORKDIR /App
|
||||
COPY . ./
|
||||
RUN dotnet restore
|
||||
EXPOSE 5226
|
||||
CMD /usr/bin/dotnet run --project /App/WebApi.csproj
|
@ -14,7 +14,7 @@
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5226",
|
||||
"applicationUrl": "http://0.0.0.0:5226",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
23
src/WebApi/docker-compose.yml
Normal file
23
src/WebApi/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
version: "3.4"
|
||||
services:
|
||||
y4f-webapi:
|
||||
build: .
|
||||
ports:
|
||||
- "5226:5226"
|
||||
labels:
|
||||
- traefik.docker.network=traefik
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.y4f-webapi.entrypoints=web-secure
|
||||
- traefik.http.routers.y4f-webapi.rule=Host(`api.y4f.hopeless-cloud.xyz`)
|
||||
- traefik.http.routers.y4f-webapi.tls=true
|
||||
- traefik.http.routers.y4f-webapi.tls.certResolver=default
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
default:
|
||||
name: y4f-default
|
||||
external: true
|
||||
traefik:
|
||||
external: true
|
@ -13,7 +13,7 @@
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5248",
|
||||
"applicationUrl": "http://0.0.0.0:5248",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
Reference in New Issue
Block a user