🍃 Added socket host ENV var to Dockerfile

This commit is contained in:
2021-10-19 21:12:48 -07:00
parent be370d2a46
commit 7b10f28ee0
2 changed files with 1 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ COPY nodemon.json /usr/src/threetwo
COPY jsdoc.json /usr/src/threetwo COPY jsdoc.json /usr/src/threetwo
RUN yarn RUN yarn
ENV DOCKER_SOCKET_HOST cat /etc/hostname
COPY . /usr/src/threetwo COPY . /usr/src/threetwo
EXPOSE 3050 EXPOSE 3050

View File

@@ -10,10 +10,6 @@ services:
env_file: ./docker-compose.env env_file: ./docker-compose.env
environment: environment:
DOCKER_SOCKET_HOST: ws://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8051 DOCKER_SOCKET_HOST: ws://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8051
entrypoint:
- /bin/sh
- -c
- ip -4 route list match 0/0 | awk '{print $$3" host.docker.internal"}' >> /etc/hosts && httpd-foreground
restart: unless-stopped restart: unless-stopped
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"