Skip to content

Commit

Permalink
modfied to custom server
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabefire committed Jun 13, 2024
1 parent a36dc5d commit 9d01405
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
39 changes: 25 additions & 14 deletions .aws/TalkWaveApiTask.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
{
"name": "talkwaveapi",
"image": "584742206045.dkr.ecr.us-east-2.amazonaws.com/talkwaveapi:latest",
"cpu": 700,
"memory": 700,
"cpu": 800,
"memory": 800,
"portMappings": [
{
"name": "talkwaveapi-80-tcp",
"containerPort": 80,
"hostPort": 80,
"name": "talkwaveapi-8080-tcp",
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp",
"appProtocol": "http"
},
{
"name": "postgres",
"containerPort": 5432,
"hostPort": 5432,
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [],
"environment": [
{
"name": "CONNECTIONSTRINGS__DEFAULTCONNECTION",
"value": "Server=talkwave.cdgsao6goy8f.us-east-2.rds.amazonaws.com;Port=5432;Database=TalkWave;Username=postgres;password=Uq85xSNS4c4Q86kD"
}
],
"environmentFiles": [
{
"value": "arn:aws:s3:::talkwave-signalr-env/.env",
Expand All @@ -32,18 +44,17 @@
"awslogs-create-group": "true",
"awslogs-region": "us-east-2",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
}
},
"healthCheck": {
"command": [
"[ \"CMD-SHELL\"",
"\"curl -f http://localhost/health || exit 1\" ]"
"CMD-SHELL",
"curl --fail http://localhost:8080/health || exit 1"
],
"interval": 30,
"timeout": 5,
"interval": 60,
"timeout": 10,
"retries": 3,
"startPeriod": 60
"startPeriod": 300
},
"systemControls": []
}
Expand All @@ -58,4 +69,4 @@
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
}
}
}
1 change: 1 addition & 0 deletions TalkWaveApi.WebSocket/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app ./
EXPOSE 8080
EXPOSE 5432

ENTRYPOINT ["dotnet", "TalkWaveApi.WebSocket.dll"]
4 changes: 2 additions & 2 deletions Dockerfile → TalkWaveApi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ ENV DOTNET_EnableWriteXorExecute=0
WORKDIR /source

# copy csproj and restore as distinct layers
COPY ./TalkWaveApi/TalkWaveApi.csproj .
COPY ./TalkWaveApi.csproj .
RUN dotnet restore

# copy everything else and build app
COPY ./TalkWaveApi/. .
COPY . .
RUN dotnet publish -c release -o /app

# final stage/image
Expand Down
3 changes: 0 additions & 3 deletions compose.yaml

This file was deleted.

0 comments on commit 9d01405

Please sign in to comment.