From 0f9fe50602b9e95e22a3c792f9b01665a2916692 Mon Sep 17 00:00:00 2001 From: Lubomir Stanko Date: Fri, 3 Nov 2023 12:50:14 +0100 Subject: [PATCH] Transition from localhost to local dev domain --- README-DEV.md | 20 +++++++++++++++++--- docker-compose.yml | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README-DEV.md b/README-DEV.md index 84598d5..88366bc 100644 --- a/README-DEV.md +++ b/README-DEV.md @@ -28,19 +28,33 @@ Arguments: - `--build` - Build all images to run fresh docker containers - `-d` - Run docker containers in the detached mode as background processes -## 4. (Optional) Run dev watch node server +### 3. Add local domain to hosts + +Add this entry to your hosts: + + 127.0.0.1 notification-server.anzusystems.local + +- Linux/Mac location: + + `/etc/hosts` + +- Windows location + + `C:\Windows\System32\drivers\etc\hosts` + +## 5. (Optional) Run dev watch node server By default the `docker-compose` command will autostart node server `yarn dev` with logs in `var/log/node-server.log` file. _Hint: You can disable node server autostart with variable `DOCKER_NODE_AUTOSTART=false` in `.env.docker.local`. You have to restart the docker-compose to apply the change._ -### 4.a. (Optional) Stop all running node servers +### 5.a. (Optional) Stop all running node servers You must stop the running node server with the command: bin/run stop -### 4.b. (Optional) Start dev watch +### 5.b. (Optional) Start dev watch Run `watch` node server (See below in the command description for more command line options): diff --git a/docker-compose.yml b/docker-compose.yml index b6561af..87d018e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: context: . dockerfile: docker/app/local/Dockerfile environment: - - VIRTUAL_HOST=notification-server.anzusystems.localhost + - VIRTUAL_HOST=notification-server.anzusystems.local - VIRTUAL_PORT=8080 env_file: - .env.docker.dist @@ -18,7 +18,7 @@ services: ports: - ${NGINX_PORT:-8490}:8080 - ${NGINX_UPSTREAM_WEBSOCKET_PORT:-3410}:3005 - hostname: notification-server.anzusystems.localhost + hostname: notification-server.anzusystems.local networks: anzusystems_network: aliases: