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

Instructions for Docker Hosting behind Reverse Proxy #824

Open
carsonbird opened this issue Apr 18, 2023 · 4 comments
Open

Instructions for Docker Hosting behind Reverse Proxy #824

carsonbird opened this issue Apr 18, 2023 · 4 comments

Comments

@carsonbird
Copy link

Hi! I'm trying to run LogChimp in a docker container behind a Traefik reverse proxy.

I can see that LogChimp uses port 8080 for the front-end and 3000 for the back-end.

We would want to have port 8080 accessible through something like https://logchimp.example.com, which is simple enough to set up. However, I need to be able to tell LogChimp that instead of port 3000 for the back-end, it would be accessed through something like https://server.logchimp.example.com or at a specific path like /server/, instead of at port 3000 (because all our traffic will be going through port 443). How would I do that?

@carsonbird
Copy link
Author

For others, check out this: Ubuntu Setup. See the Nginx section. It looks like you can set a path prefix filter for /api and route those requests to :3000, and let everything else go to :8080.

@carsonbird
Copy link
Author

Still haven't got this up and running, but I think that port setup isn't the problem.

@mittalyashu
Copy link
Member

What issue are you facing other than the port setup while deploying the LogChimp?

@carsonbird
Copy link
Author

@mittalyashu Not sure. Here are my logs. I'm not seeing much in there that would be caused by my setup (as opposed to the docker image itself), other than maybe proxy or routing issues, but I'm not sure what to configure them to for LogChimp.

yarn global v1.22.4
[1/4] Resolving packages...
Error: connect ECONNREFUSED 172.0.7.2:5432
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '172.0.7.2',
�
  port: 5432
}
warning @vue/cli-service > webpack-chain@6.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @vue/cli-service > @vue/component-compiler-utils > consolidate@0.15.1: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
warning @vue/cli-service > webpack-dev-server > webpack-dev-middleware > memfs@3.6.0: this will be v4
warning @vue/cli-service > cssnano > cssnano-preset-default > postcss-svgo > svgo > stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
warning @vue/cli-plugin-babel > @vue/babel-preset-app > @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
[2/4] Fetching packages...
info fsevents@2.3.3: The platform "linux" is incompatible with this module.
info "fsevents@2.3.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@vue/cli-plugin-eslint > eslint-webpack-plugin@3.2.0" has unmet peer dependency "eslint@^7.0.0 || ^8.0.0".
warning " > @vue/cli-plugin-eslint@5.0.8" has unmet peer dependency "eslint@>=7.5.0".
[4/4] Building fresh packages...
success Installed "http-server@14.1.1" with binaries:
      - http-server
warning "@vue/cli-plugin-babel@5.0.8" has no binaries
success Installed "@vue/cli-service@5.0.8" with binaries:
      - vue-cli-service
warning "@vue/cli-plugin-eslint@5.0.8" has no binaries
warning "vue-template-compiler@2.7.16" has no binaries
Done in 19.72s.
 ERROR  TypeError: transpileDependencies.map is not a function
TypeError: transpileDependencies.map is not a function
    at genTranspileDepRegex (/root/logchimp/node_modules/@vue/cli-plugin-babel/index.js:6:38)
    at module.exports (/root/logchimp/node_modules/@vue/cli-plugin-babel/index.js:22:29)
    at /usr/local/share/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:82:9
    at Array.forEach (<anonymous>)
    at loadedCallback (/usr/local/share/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:80:20)
    at Service.init (/usr/local/share/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:97:14)
    at Service.run (/usr/local/share/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:247:16)
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
http://localhost:3000
Starting up http-server, serving ./dist
http-server version: 14.1.1
http-server settings: 
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: not visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
  http://127.0.0.1:8080
  http://172.0.36.3:8080
  http://172.0.7.3:8080
Hit CTRL-C to stop the server
[2024-01-19T23:34:09.848Z]  "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
(node:65) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
[2024-01-19T23:34:09.858Z]  "GET /" Error (404): "Not found"
[2024-01-19T23:34:13.467Z]  "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
[2024-01-19T23:34:13.471Z]  "GET /" Error (404): "Not found"
[2024-01-19T23:36:33.412Z]  "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
[2024-01-19T23:36:33.416Z]  "GET /" Error (404): "Not found"
[2024-01-19T23:36:36.413Z]  "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
[2024-01-19T23:36:36.417Z]  "GET /" Error (404): "Not found"

Those 404 errors are being returned by LogChimp, and not the proxy in front of it, so the proxy is at least definitely routing some requests to LogChimp.

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

2 participants