truenas / apps

GNU Lesser General Public License v3.0
81 stars 29 forks source link

Community Chart App Request: nginx #1101

Open Spunky17 opened 21 hours ago

Spunky17 commented 21 hours ago

Nginx is a simple webserver with php support. Not to be confused with Nginx Proxy Manager (NPM) which is already available.

https://github.com/nginx/nginx

stavros-k commented 20 hours ago

How do you imagine this being used? ie, what options should be available?

I think the nginx config is very use-case specific.

Spunky17 commented 20 hours ago

Excellent questions.

Right now I'm using it to deploy websites behind NPM with the config options below. I have NPM configured to proxy my site URLs to the sites below using the URLs to map to the different ports noted below.

services:
  nginx:
    container_name: nginx
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 4096M
    environment:
      - PUID=568
      - PGID=568
      - TZ=Etc/UTC
    image: lscr.io/linuxserver/nginx:latest
    labels:
      - diun.enable=true
    ports:
      - 8080:8080 <site 1>
      - 8081:8081 <site 2>
      - 8082:8082 <site 3>
    restart: unless-stopped
    volumes:
      - <local directory to config>:/config
      - <local directory to sites>:/sites

I guess in summary it would be helpful to allow the config to be based on the TrueNAS filesystem similar to how Nextcloud is setup.