Giter VIP home page Giter VIP logo

base-python-asgi's Introduction

EVRY FS python ASGI base image

Docker Repository on Quay

This image forms the basis for running python ASGI applications. It is based on the EVRY python base image and uses uvicorn.

Usage

The image bundles a wrapper script for uvicorn at /bin/start_uvicorn. It uses environment flags to control how the ASGI application is started.

Available flags

Flag Default Comment
UVICORN_PORT 8000 Application port.
UVICORN_HOST 0.0.0.0 Application bind address.
UVICORN_LOG_LEVEL info Set uvicorn log level.
CONTEXT_ROOT None Context root where application is served.

Creating a Dockerfile

To utilize this image to create a container for your application, create a new Dockerfile based on this. Then add your python sauce to the container and set the name of the ASGI module with CMD ["module:callable"].

FROM quay.io/evryfs/base-python-asgi:3.9-stable
ARG BUILD_DATE
ARG BUILD_URL
ARG GIT_URL
ARG GIT_COMMIT
LABEL maintainer="Your Name <[email protected]>"
      com.finods.ccm.system="<system short name>"
      com.finods.ccm.group="<finods group>"
      org.opencontainers.image.title="<application name>"
      org.opencontainers.image.created=$BUILD_DATE
      org.opencontainers.image.authors="<name of system responsible>"
      org.opencontainers.image.url=$BUILD_URL
      org.opencontainers.image.documentation="<link to SAD>"
      org.opencontainers.image.source=$GIT_URL
      org.opencontainers.image.version="<version number>"
      org.opencontainers.image.revision=$GIT_COMMIT
      org.opencontainers.image.vendor="EVRY Financial Services"
      org.opencontainers.image.licenses="proprietary-license"
      org.opencontainers.image.description="<system description>"

COPY . .
CMD ["asgi_module:app"]

The default workdir for this image is /app, so any sauce will be copied there. Remember to reset WORKDIR to /app, if you do additional steps in your derivative image. The wrapper scripts depends on the module being either in python's site-packages or present in the current directory.

base-python-asgi's People

Contributors

dependabot[bot] avatar kriberg avatar

Watchers

 avatar

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.