Sign inSign up

baibgj/ceph

By baibgj

Updated over 1 year ago

Image
0

155

baibgj/ceph repository overview

Quick reference

uWSGI | openEuler

Current uWSGI docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

uWSGI is an open source software application that "aims at developing a full stack for building hosting services". It is named after the Web Server Gateway Interface (WSGI), which was the first plugin supported by the project. uWSGI is maintained by the Italian-based software company unbit.

The tag of each uwsgi docker image is consist of the version of uwsgi and the version of basic image. The details are as follows

TagCurrentlyArchitectures
2.0.29-oe2403sp1uWSGI 2.0.29 on openEuler 24.03-LTS-SP1amd64, arm64

Usage

In this usage, users can select the corresponding {Tag} based on their requirements.

  • Pull the openeuler/uwsgi image from docker

    docker pull openeuler/uwsgi:{Tag}
    
  • Run with an interactive shell

    You can start the container with an interactive shell to use uwsgi.

    docker run -it --rm openeuler/uwsgi:{Tag} bash
    
  • Prepare tne Application

    Create Working Directory

    mkdir /app
    

    Create WSGI Entry File(myapp.py)

    # /app/myapp.py
    def application(environ, start_response):
        status = '200 OK'
        headers = [('Content-type', 'text/plain; charset=utf-8')]
        start_response(status, headers)
        return [b"Hello World from uWSGI!"]
    
  • Set Up Non-Root User & Permissions

    Create Dedicated User & Group

    groupadd -r uwsgi_group
    useradd -r -g uwsgi_group -d /app -s /bin/false uwsgi_user
    

    Set Proper Permissions

    chown -R uwsgi_user:uwsgi_group /app
    chmod -R 755 /app
    
  • Start uWSGI with Recommended Parameters

    Basic Command

    ./uwsgi \
      --http-socket :8000 \
      --processes 4 \
      --threads 2 \
      --chdir /app \
      --wsgi-file myapp.py \
      --master \
      --enable-threads \
      --buffer-size 32768 \
      --uid uwsgi_user \
      --gid uwsgi_group
    
    **Parameters Explanation**:
    
    | Parameter | Description | Recommended Value |
    |----------|-------------|------------------|
    | `--http-socket :8000` | Bind to TCP port 8000 (HTTP mode) | `:8000` (or any available port) |
    
    

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

Tag summary

Content type

Image

Digest

sha256:0f9660716

Size

5.7 GB

Last updated

over 1 year ago

docker pull baibgj/ceph:20.3.0-oe2403sp1