Negaihoshi / nginx-unit-nodejs16-python310

Nginx Unit Server with NodeJS 16 and Python 3.10 modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nginx Unit Server with NodeJS 16 and Python 3.10 modules

This is just testing code for Nginx Unit so I can run a Svelte frontend with a FastAPI backend.

To Use:

  • Build image and Run

    make
    
  • Run NodeJS app build

    make build
    
  • Configure Unitd

    make config
    

    if there's an error, you can check the container logs:

    docker logs unit -f
    

    or exec into the container and look around:

    docker exec -ti -w /www unit /bin/bash
    su - unit
    
  • Restart Apps (as needed) The apps will need to be restarted if using a mount and the code is changed on disk.

    # nodejs
    make app_restart_node
    
    # fastapi
    make app_restart_fapi
    

    or both

    make app_restart
    

Some Reading:

About

Nginx Unit Server with NodeJS 16 and Python 3.10 modules


Languages

Language:Dockerfile 42.7%Language:Shell 27.2%Language:Makefile 14.9%Language:JavaScript 9.2%Language:HTML 3.4%Language:Svelte 1.4%Language:Python 1.2%