Skip to content

Commit

Permalink
- use ${LOCAL_WORKSPACE_FOLDER-..} for api
Browse files Browse the repository at this point in the history
- changed host.docker.interal to container name
  • Loading branch information
Ronaldo Macapobre committed Jul 23, 2024
1 parent 5e11f97 commit ae05ff8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions api/Controllers/LocationController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
Expand Down Expand Up @@ -31,6 +32,8 @@ public async Task<ActionResult<List<Location>>> GetLocationsAndCourtRooms()
{
var locations = await _locationService.GetLocations();

Console.WriteLine("123");

var locationList = locations.Select(location => new Location
{
Name = location.LongDesc,
Expand All @@ -44,7 +47,7 @@ public async Task<ActionResult<List<Location>>> GetLocationsAndCourtRooms()
foreach (var location in locationList)
{
location.CourtRooms = courtRooms.Where(cr => cr.Flex == location.LocationId && (cr.ShortDesc == "CRT" || cr.ShortDesc == "HGR"))
.Select(cr => new CourtRoom {LocationId = cr.Flex, Room = cr.Code, Type = cr.ShortDesc}).ToList();
.Select(cr => new CourtRoom { LocationId = cr.Flex, Room = cr.Code, Type = cr.ShortDesc }).ToList();
}

return Ok(locationList);
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ services:
ports:
- 5000:5000
volumes:
- ../api/:/opt/app-root/src/api
- ../db/:/opt/app-root/src/db
- ../jc-interface-client/:/opt/app-root/src/jc-interface-client
- ${LOCAL_WORKSPACE_FOLDER-..}/api/:/opt/app-root/src/api
- ${LOCAL_WORKSPACE_FOLDER-..}/db/:/opt/app-root/src/db
- ${LOCAL_WORKSPACE_FOLDER-..}/jc-interface-client/:/opt/app-root/src/jc-interface-client
- api-dev-bin:/opt/app-root/src/api/bin
- api-dev-obj:/opt/app-root/src/api/obj
- ./seed:/opt/app-root/data
Expand Down
2 changes: 1 addition & 1 deletion web/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
//This is for WEB_BASE_HREF = '/' specifically.
//If having problems connecting, try adding: netsh http add iplisten 127.0.0.1
'^/api': {
target: "http://host.docker.internal:5000",
target: "http://api:5000",
headers: {
Connection: 'keep-alive',
'X-Forwarded-Host': 'localhost',
Expand Down

0 comments on commit ae05ff8

Please sign in to comment.