Giter Club home page Giter Club logo

Comments (11)

houdini69 avatar houdini69 commented on May 18, 2024 1

Is this just using "https://hub.docker.com/r/arm64v8/node/" for the Docker images? I haven't done it before, but it looks like it should be a small change, since Node on Arm64v8 is a supported architecture for the official Node image. @houdini69 can you try and submit a PR if you get something working?

I'm just an end user and don't know how to build a docker image. Therefore, I leave it to someone more knowledgeable than me to test your suggestion!

from our-shopping-list.

houdini69 avatar houdini69 commented on May 18, 2024 1

I finally succeeded by removing those two lines in my reverse proxy nginx config

rewrite /(.*) /ws://127.0.0.1:8100/$1 break;
rewrite /(.*) http://127.0.0.1:8100/$1 redirect;

Thanks for your help!

from our-shopping-list.

nanawel avatar nanawel commented on May 18, 2024

Hi @houdini69
I guess it could be possible but unfortunately this is not a priority in a near future. I'm already struggling to find the time to implement new features 😕

PRs are welcome of course, if someone can take a look at this.

from our-shopping-list.

richardneish avatar richardneish commented on May 18, 2024

Is this just using "https://hub.docker.com/r/arm64v8/node/" for the Docker images? I haven't done it before, but it looks like it should be a small change, since Node on Arm64v8 is a supported architecture for the official Node image. @houdini69 can you try and submit a PR if you get something working?

from our-shopping-list.

houdini69 avatar houdini69 commented on May 18, 2024

I finally tried to build docker image on my Debian Bullseye server and successfully get running container with docker-compose. Container has an "healthy" status. However, I couldn't connect in my LAN on listening port.

My docker-compose configuration
version: '3.2'

services:
app:
image: our-shopping-list:latest
restart: always
ports:
- '8100:8100'
environment:
# Default values below
VUE_APP_I18N_LOCALE: fr
VUE_APP_I18N_FALLBACK_LOCALE: fr
VUE_APP_I18N_FORCE_LOCALE: 0
VUE_APP_SINGLEBOARD_MODE: 0
depends_on:
- mongodb

mongodb:
image: mongo:4
volumes:
- dbdata:/data/db

volumes:
dbdata:

How to debug?

from our-shopping-list.

nanawel avatar nanawel commented on May 18, 2024

Hi @houdini69
That's great news, thanks for your time.

Could you use the "three backticks" syntax to format your YAML please? That would help readability a lot.

About your port issue, that seems like an easy detail to fix: you're using 8100 for the internal port while the Node server listens on 8080 by default.
So both alternatives below should work in your docker-compose.yml if you absolutely need your host to listen on 8100 on its interfaces:

...
    ports:
      - '8100:8080'

or

...
    ports:
      - '8100:8100'
    environment:
      LISTEN_PORT: 8100

from our-shopping-list.

houdini69 avatar houdini69 commented on May 18, 2024

here it is my original docker-compose.yml

version: '3.2'

services:
  app:
    image: our-shopping-list:latest
    restart: always
    ports:
      - '8100:8100'
    environment:
      # Default values below
      VUE_APP_I18N_LOCALE: fr
      VUE_APP_I18N_FALLBACK_LOCALE: fr
      VUE_APP_I18N_FORCE_LOCALE: 0
      VUE_APP_SINGLEBOARD_MODE: 0
    depends_on:
      - mongodb

  mongodb:
    image: mongo:4
    volumes:
      - dbdata:/data/db

volumes:
  dbdata:

I'm going to try your suggestion.

from our-shopping-list.

houdini69 avatar houdini69 commented on May 18, 2024

Same result: unable to connect to app

from our-shopping-list.

houdini69 avatar houdini69 commented on May 18, 2024

compose docker logs gives:

docker compose logs
our-shopping-list-app-1 | Using web root: /
our-shopping-list-app-1 | Serving socket-io on /socket.io/
our-shopping-list-app-1 | (node:1) [MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning.
our-shopping-list-app-1 | (Use node --trace-deprecation ... to show where the warning was created)
our-shopping-list-app-1 | OSL Server started on [::]:8100
our-shopping-list-app-1 | Current environment: {
our-shopping-list-app-1 | VUE_APP_I18N_FORCE_LOCALE: '0',
our-shopping-list-app-1 | NODE_VERSION: '18.18.2',
our-shopping-list-app-1 | HOSTNAME: 'c85a33766622',
our-shopping-list-app-1 | YARN_VERSION: '1.22.19',
our-shopping-list-app-1 | SHLVL: '1',
our-shopping-list-app-1 | VUE_APP_I18N_LOCALE: 'fr',
our-shopping-list-app-1 | HOME: '/root',
our-shopping-list-app-1 | APP_BUILD_ID: '',
our-shopping-list-app-1 | PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
our-shopping-list-app-1 | VUE_APP_SINGLEBOARD_MODE: '0',
our-shopping-list-app-1 | LISTEN_PORT: '8100',
our-shopping-list-app-1 | APP_ENV: 'production',
our-shopping-list-app-1 | PWD: '/app',
our-shopping-list-app-1 | VUE_APP_I18N_FALLBACK_LOCALE: 'fr',
our-shopping-list-app-1 | APP_VERSION: ''
our-shopping-list-app-1 | }

and then mongodb infos

from our-shopping-list.

houdini69 avatar houdini69 commented on May 18, 2024

Tried to set a reverse proxy with nginx and got message "Invalid request: GET /ws://127.0.0.1:8100/" in the browser

My reverse proxy nginx configuration:

server {
    listen 80;
    listen [::]:80;
    server_name xxxx.xxxxx.fr;

    if ($allowed_country = no) {
            return 444;
        }

    include /etc/nginx/conf.d/acme-challenge.inc;

    include /etc/nginx/conf.d/xxxx.xxxxx.fr/*.conf;

    access_log /var/log/nginx/xxxx.xxxxx.fr-access.log;
    error_log /var/log/nginx/xxxx.xxxxx.fr-error.log;

	location / {

    # Force usage of https
    if ($scheme = http) {
    rewrite ^ https://$server_name$request_uri? permanent;
   }

     # restriction d'accès
    # proxy_bind $server_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Host $host;
     proxy_set_header X-Forwarded-Server $host;
     proxy_set_header Host $host;
     proxy_pass http://127.0.0.1:8100;
     rewrite /(.*) /ws://127.0.0.1:8100/$1 break;
     rewrite /(.*) http://127.0.0.1:8100/$1 redirect;

     # Websocket support
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "Upgrade";
     proxy_read_timeout 86400;
	}
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name xxxx.xxxxx.fr;

    if ($allowed_country = no) {
            return 444;
        }

    include /etc/nginx/conf.d/acme-challenge.inc;

    ssl_certificate /etc/letsencrypt/live/xxxxx.fr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/xxxxx.fr/privkey.pem;

    include /etc/nginx/conf.d/xxxx.xxxxx.fr/*.conf;

    access_log /var/log/nginx/xxxx.xxxxx.fr-access.log;
    error_log /var/log/nginx/xxxx.xxxxx.fr-error.log;
    
    location / {

  # Force usage of https
  if ($scheme = http) {
    rewrite ^ https://$server_name$request_uri? permanent;
  }

    # proxy_bind $server_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Host $host;
     proxy_set_header X-Forwarded-Server $host;
     proxy_set_header Host $host;
     proxy_pass http://127.0.0.1:8100;
     rewrite /(.*) /ws://127.0.0.1:8100/$1 break;
     rewrite /(.*) http://127.0.0.1:8100/$1 redirect;

     # Websocket support
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "Upgrade";
     proxy_read_timeout 86400;
	}
}

from our-shopping-list.

nanawel avatar nanawel commented on May 18, 2024

I've added an example in the README of what should go into the vhost when using Nginx as a reverse-proxy:
https://github.com/nanawel/our-shopping-list#nginx

You should take a look. You'll notice I don't use rewrite for a start.

from our-shopping-list.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.