Skip to content

Commit 0e653d9

Browse files
authored
bug: default configuration does not work on linux vms (#101)
* bug: default configuration does not work on linux vms the host.docker.internal notation is not support in every version of docker https://commandlinux.com/qa/host-docker-internal/. To fix this we provide a fallback. src: https://abhihyder.medium.com/fixing-host-docker-internal-issue-in-docker-compose-on-linux-f733006dfa12 * update: dependencies bump
1 parent 1cd72d9 commit 0e653d9

4 files changed

Lines changed: 143 additions & 139 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ VITE_SERVER_PORT=5173 # dev server port
1616
# Values used by `docker-compose.dev.yml`. Compose will substitute ${VAR} from the
1717
# project `.env` or the shell environment when you run `docker compose`.
1818
VITE_APP_VERSION=development
19-
VITE_BACKEND_URL=http://host.docker.internal:8080 # backend API URL used by the frontend inside the container (host.docker.internal points to the host machine)
19+
VITE_BACKEND_URL=http://host.docker.internal:8080 # backend API URL used by the frontend inside the container (resolved via Compose host mapping)
2020
VITE_SERVER_PORT=5173 # dev server port inside the container
2121
DOCKER_HOST_PORT=5173 # port on the host machine mapped to the container's VITE_SERVER_PORT (for browser access)
2222

2323
########## Production (nginx) ##########
2424
# Values used at container runtime by nginx to proxy /api/
25-
NGINX_BACKEND_URL=http://host.docker.internal:8080/ # backend API URL used by nginx inside the container (host.docker.internal points to the host machine)
25+
NGINX_BACKEND_URL=http://host.docker.internal:8080/ # backend API URL used by nginx inside the container (resolved via Compose host mapping)
2626
NGINX_SERVER_PORT=8081 # port nginx listens on inside the container
2727
DOCKER_HOST_PORT=8081 # port on the host machine mapped to the container's NGINX_SERVER_PORT (for browser access)

docker-compose.dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ services:
22
soarca-gui-dev:
33
container_name: soarca-gui-dev
44
image: soarca-gui:dev
5+
extra_hosts:
6+
- "host.docker.internal:host-gateway"
57
build:
68
context: .
79
dockerfile: Dockerfile.dev

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ services:
22
soarca-gui:
33
container_name: soarca-gui
44
image: soarca-gui:latest
5+
extra_hosts:
6+
- "host.docker.internal:host-gateway"
57
build:
68
context: .
79
dockerfile: Dockerfile

0 commit comments

Comments
 (0)