██▒   █▓ ▒█████   ██▓▓█████▄ 
▓██░   █▒▒██▒  ██▒▓██▒▒██▀ ██▌
 ▓██  █▒░▒██░  ██▒▒██▒░██   █▌
  ▒██ █░░▒██   ██░░██░░▓█▄   ▌
   ▒▀█░  ░ ████▓▒░░██░░▒████▓ 
   ░ ▐░  ░ ▒░▒░▒░ ░▓   ▒▒▓  ▒ 
   ░ ░░    ░ ▒ ▒░  ▒ ░ ░ ▒  ▒ 
     ░░  ░ ░ ░ ▒   ▒ ░ ░ ░  ░ 
      ░      ░ ░   ░     ░    
     ░                 ░      
    

 ___      ___ ________  ___  ________     
|\  \    /  /|\   __  \|\  \|\   ___ \    
\ \  \  /  / | \  \|\  \ \  \ \  \_|\ \   
 \ \  \/  / / \ \  \\\  \ \  \ \  \ \\ \  
  \ \    / /   \ \  \\\  \ \  \ \  \_\\ \ 
   \ \__/ /     \ \_______\ \__\ \_______\
    \|__|/       \|_______|\|__|\|_______|
    

Yane ✖ Karov

  • QR Code Generator Usage Guide

    A guide on the various ways to use and setup the QR Code Generator Service

    Automatic Lets-Encrypt Production Certificates & HTTPS Servers Setup

    docker-primary@ubuntu:~/QRGen$ ./install.sh
    Welcome to the QR Code Generator setup script!
    1) Run Setup				6) Update Project
    2) Run Mock Configuration		7) Stop Project Docker Containers
    3) Uninstall				8) Prune All Docker Builds - Dangerous
    4) Reload/Refresh			9) Quit
    5) Dump logs
    # Select 1)
    ...
    Selected port 8080 is available.
    1: Install minimal release (frontend QR generation) (Limited features)
    2: Install full release (frontend QR generator and backend API/server side generation) (All features)
    Please enter your choice (1/2): 2
    Would you like to disable Docker build caching for this run? (yes/no):
    yes
    Would you like to specify a domain name other than the default (http://localhost) (yes/no)?
    yes
    Enter your domain name (e.g., example.com): qr-gen.net
    Using custom domain name: http://qr-gen.net
    Would you like to specify a subdomain other than the default (none) (yes/no)?
    yes
    Enter your subdomain name (e.g., www): void
    Using custom subdomain: http://void.qr-gen.net
    1: Use Let's Encrypt SSL
    2: Use self-signed SSL certificates
    3: Do not enable SSL
    Please enter your choice (1/2/3): 1
    1: Run automatic staging setup for Let's Encrypt SSL (Recommended for testing)
    2: Run automatic production setup for Let's Encrypt SSL (Recommended for production)
    3: Run custom setup for Let's Encrypt SSL
    Please enter your choice (1/2/3): 2
    ...
    NGINX configuration written to /home/docker-primary/QRGen/nginx.conf
    Bringing down existing Docker Compose services...
    Generating self-signed certificates for qr-gen.net...
    /home/docker-primary/QRGen/certs/live/qr-gen.net already exists.
    /home/docker-primary/QRGen/certs/dhparam already exists.
    Do you want to regenerate the certificates in /home/docker-primary/QRGen/certs/live/qr-gen.net? [y/N]: y
    ...
    Self-signed certificates for qr-gen.net generated at /home/docker-primary/QRGen/certs/live/qr-gen.net.
    1: Use 2048-bit DH parameters (Faster)
    2: Use 4096-bit DH parameters (More secure)
    Please enter your choice (1/2): 2
    Generate a Diffie-Hellman (DH) key exchange parameters file with 4096 bits...
    Generating DH parameters, 4096 bit long safe prime
    ...
    

    Custom Lets-Encrypt Production Certificates & HTTPS Servers Setup (Full Install)

    Port 8080 is already in use.
    Please provide an alternate port or Ctrl+C to exit: 8081
    Selected port 8081 is available.
    1: Install minimal release (frontend QR generation) (Limited features)
    2: Install full release (frontend QR generator and backend API/server side generation) (All features)
    Please enter your choice (1/2): 2
    Would you like to disable Docker build caching for this run? (yes/no):
    yes
    Would you like to specify a domain name other than the default (http://localhost) (yes/no)?
    yes
    Enter your domain name (e.g., example.com): qr-gen.net
    Using custom domain name: http://qr-gen.net
    Would you like to specify a subdomain other than the default (none) (yes/no)?
    yes
    Enter your subdomain name (e.g., www): void
    Using custom subdomain: http://void.qr-gen.net
    1: Use Let's Encrypt SSL
    2: Use self-signed SSL certificates
    3: Do not enable SSL
    Please enter your choice (1/2/3): 1
    1: Run automatic staging setup for Let's Encrypt SSL (Recommended for testing)
    2: Run automatic production setup for Let's Encrypt SSL (Recommended for production)
    3: Run custom setup for Let's Encrypt SSL
    Please enter your choice (1/2/3): 3
    Please enter your Let's Encrypt email or type 'skip' to skip: skip
    Would you like to use a production SSL certificate? (yes/no):
    yes
    Would you like to use a dry run? (yes/no):
    yes
    Would you like to force current certificate renewal? (yes/no):
    yes
    Would you like to automatically renew your SSL certificate? (yes/no):
    yes
    Would you like to enable HSTS? (yes/no):
    yes
    Would you like to enable OCSP Stapling? (yes/no):
    yes
    Would you like to enable Must Staple? (yes/no):
    no
    Would you like to enable Strict Permissions? (yes/no):
    no
    Would you like to enable UIR (Unique Identifier for Revocation)? (yes/no):
    yes
    Would you like to overwrite self-signed certificates? (yes/no):
    yes
    Would you like to enable TLSv1.3? (yes/no) (Recommended):
    yes
    Would you like to enable TLSv1.2? (yes/no):
    no
    ...
    Please enter your choice (1/2): 2
    Generate a Diffie-Hellman (DH) key exchange parameters file with 4096 bits...
    Generating DH parameters, 4096 bit long safe prime
    ...
    

    Other Usage

    For http only, localhost (frontend/in-browser qr generation)

    ...
    1: Install minimal release (frontend QR generation) (Limited features)
    2: Install full release (frontend QR generator and backend API/server side generation) (All features)
    Please enter your choice (1/2): 1
    Would you like to disable Docker build caching for this run? (yes/no):
    yes
    Would you like to specify a domain name other than the default (http://localhost) (yes/no)?
    no
    Using default domain name: localhost
    Would you like to enable self-signed certificates? (yes/no):
    no
    

    For self-signed https only, localhost (backend/server-side qr generation)

    Port 8080 is already in use.
    Please provide an alternate port or Ctrl+C to exit: 8081
    Selected port 8081 is available.
    1: Install minimal release (frontend QR generation) (Limited features)
    2: Install full release (frontend QR generator and backend API/server side generation) (All features)
    Please enter your choice (1/2): 2
    Would you like to disable Docker build caching for this run? (yes/no):
    yes
    Would you like to specify a domain name other than the default (http://localhost) (yes/no)?
    no
    Using default domain name: localhost
    Would you like to enable self-signed certificates? (yes/no):
    yes
    

    For DH parameter generation - select the option that best suits you

    Self-signed certificates for localhost generated at /home/docker-primary/QRGen/certs/live/localhost.
    1: Use 2048-bit DH parameters (Faster)
    2: Use 4096-bit DH parameters (More secure)
    Please enter your choice (1/2): 1
    Generate a Diffie-Hellman (DH) key exchange parameters file with 2048 bits...
    Generating DH parameters, 2048 bit long safe prime
    

    Updating

    docker-primary@ubuntu:~/QRGen$ ./install.sh
    Welcome to the QR Code Generator setup script!
    1) Run Setup				6) Update Project
    2) Run Mock Configuration		7) Stop Project Docker Containers
    3) Uninstall				8) Prune All Docker Builds - Dangerous
    4) Reload/Refresh			9) Quit
    5) Dump logs
    # Select 6)
    No local changes to save
    remote: Enumerating objects: 241, done.
    remote: Counting objects: 100% (241/241), done.
    remote: Compressing objects: 100% (133/133), done.
    remote: Total 241 (delta 106), reused 218 (delta 93), pack-reused 0
    Receiving objects: 100% (241/241), 48.64 KiB | 3.04 MiB/s, done.
    Resolving deltas: 100% (106/106), completed with 21 local objects.
    From https://github.com/error-try-again/QRGen
       477e3a5..8ef7a51  main                    -> origin/main
     * [new branch]      error-try-again-patch-1 -> origin/error-try-again-patch-1
     * [new branch]      legacy-frontend-only    -> origin/legacy-frontend-only
     * [new branch]      legacy-full-release     -> origin/legacy-full-release
     * [new branch]      submodule-support       -> origin/submodule-support
    Updating 477e3a5..8ef7a51
    ...
    Thanks for using the QR Code Generator setup script!
    

    Stop Containers

    docker-primary@ubuntu:~/QRGen$ ./install.sh
    Welcome to the QR Code Generator setup script!
    1) Run Setup				6) Update Project
    2) Run Mock Configuration		7) Stop Project Docker Containers
    3) Uninstall				8) Prune All Docker Builds - Dangerous
    4) Reload/Refresh			9) Quit
    5) Dump logs
    # Select 7)
    Ensuring Docker environment variables are set...
    Set DOCKER_HOST to unix:///run/user/1000/docker.sock
    Stopping containers using docker-compose...
    [+] Running 5/5
     ✔ Container qrgen-certbot-1   Removed                                                                   0.0s
     ✔ Container qrgen-frontend-1  Removed                                                                   0.6s
     ✔ Container qrgen-backend-1   Removed                                                                  10.3s
     ✔ Network qrgen_default       Removed                                                                   0.3s
     ✔ Network qrgen_qrgen         Removed                                                                   0.5s
    Thanks for using the QR Code Generator setup script!
    

    Prune containers

    Welcome to the QR Code Generator setup script!
    1) Run Setup				6) Update Project
    2) Run Mock Configuration		7) Stop Project Docker Containers
    3) Uninstall				8) Prune All Docker Builds - Dangerous
    4) Reload/Refresh			9) Quit
    5) Dump logs
    # Select 8)
    Ensuring Docker environment variables are set...
    Set DOCKER_HOST to unix:///run/user/1000/docker.sock
    Identifying and purging Docker resources associated with 'qrgen'...
    No 'qrgen' containers found.
    Removing 'qrgen' images...
    Untagged: qrgen-certbot:latest
    Deleted: sha256:27274e67793b51028a72c51eb36c691eb690d1cc8eb544889a4417081cb6976c
    Untagged: qrgen-frontend:latest
    Deleted: sha256:087f9ead639be4602c155f1898697da569f44cbf2666e92c5d6ac581202fc860
    Untagged: qrgen-backend:latest
    Deleted: sha256:df2bc734be1ec8b8eac6f1febc842bedf5997a6f4b4aa3cee79a99dddc11b8a2
    Removing 'qrgen' volumes...
    qrgen_nginx-shared-volume
    No 'qrgen' networks found.
    Thanks for using the QR Code Generator setup script!
    

    © 2024 Yane ✖ Karov