Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributing Guide - Docker #448

Open
sergbbb opened this issue Sep 3, 2023 · 1 comment
Open

Contributing Guide - Docker #448

sergbbb opened this issue Sep 3, 2023 · 1 comment
Assignees

Comments

@sergbbb
Copy link

sergbbb commented Sep 3, 2023

Fix patch for Docker Contributing Guide

From 675f740810318b2430c48354a5d45bfc2028a327 Mon Sep 17 00:00:00 2001
From: Serhii Khoroshko <khoroshko@gmail.com>
Date: Sun, 3 Sep 2023 16:27:31 +0300
Subject: [PATCH] Fixes for Docker development start

---
 config/environments/development.rb    | 3 +++
 docker-compose.yaml                   | 1 +
 docker/Dockerfile                     | 2 +-
 docker/dockerfiles/webpack.Dockerfile | 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/config/environments/development.rb b/config/environments/development.rb
index 557000065..680d0b2b0 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,6 +1,9 @@
 Rails.application.configure do
   # Settings specified here will take precedence over those in config/application.rb.
 
+  # Allow access from any IP
+  config.web_console.whitelisted_ips = ['127.0.0.0/8', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
+
   # In the development environment your application's code is reloaded on
   # every request. This slows down response time but is perfect for development
   # since you don't have to restart the web server when you make code changes.
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 1fbf28da9..ecb34647d 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -79,6 +79,7 @@ services:
       - WEBPACKER_DEV_SERVER_HOST=0.0.0.0
       - NODE_ENV=development
       - RAILS_ENV=development
+      - NODE_OPTIONS=--openssl-legacy-provider
     entrypoint: docker/entrypoints/webpack.sh
     command: bin/webpack-dev-server
 
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 676b5bf74..6503530b7 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -104,7 +104,7 @@ RUN apk update && apk add --no-cache \
   && gem install bundler
 
 RUN if [ "$RAILS_ENV" != "production" ]; then \
-  apk add --no-cache nodejs yarn; \
+  apk add --no-cache nodejs-current yarn; \
   fi
 
 COPY --from=pre-builder /gems/ /gems/
diff --git a/docker/dockerfiles/webpack.Dockerfile b/docker/dockerfiles/webpack.Dockerfile
index ec5cdc100..7acea4f2b 100644
--- a/docker/dockerfiles/webpack.Dockerfile
+++ b/docker/dockerfiles/webpack.Dockerfile
@@ -1,5 +1,7 @@
 FROM chatwoot:development
 
+RUN apk update && apk add --no-cache nodejs-current yarn
+
 RUN chmod +x docker/entrypoints/webpack.sh
 
 EXPOSE 3035
-- 
2.36.1.windows.1


@pranavrajs pranavrajs transferred this issue from chatwoot/chatwoot Sep 22, 2023
@pranavrajs
Copy link
Member

@vishnu-narayanan Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants