"Fossies" - the Fresh Open Source Software Archive

Member "monasca-api-4.0.0/docker/Dockerfile" (13 May 2020, 2598 Bytes) of package /linux/misc/openstack/monasca-api-4.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Dockerfile": 3.1.0_vs_4.0.0.

    1 ARG DOCKER_IMAGE=monasca/api
    2 ARG APP_REPO=https://review.opendev.org/openstack/monasca-api
    3 
    4 # Branch, tag or git hash to build from.
    5 ARG REPO_VERSION=master
    6 ARG CONSTRAINTS_BRANCH=master
    7 
    8 # Extra Python3 dependencies.
    9 # gevent is not in upper constrains and v1.3.6 is not working with
   10 # older greenlet.
   11 ARG EXTRA_DEPS="gunicorn gevent==1.3.5 python-memcached influxdb"
   12 
   13 # Always start from `monasca-base` image and use specific tag of it.
   14 ARG BASE_TAG=master
   15 FROM monasca/base:$BASE_TAG
   16 
   17 # Environment variables used for our service or wait scripts.
   18 ENV \
   19     KAFKA_URI=kafka:9092 \
   20     KAFKA_WAIT_FOR_TOPICS=alarm-state-transitions,metrics \
   21     MONASCA_CONTAINER_API_PORT=8070 \
   22     DATABASE_BACKEND=influxdb \
   23     INFLUX_HOST=influxdb \
   24     INFLUX_PORT=8086 \
   25     INFLUX_USER=mon_api \
   26     INFLUX_PASSWORD=password \
   27     INFLUX_DB=mon \
   28     CASSANDRA_CONTACT_POINTS=cassandra \
   29     CASSANDRA_PORT=9042 \
   30     CASSANDRA_KEY_SPACE=monasca \
   31     CASSANDRA_USER=mon_persister \
   32     CASSANDRA_PASSWORD=password \
   33     CASSANDRA_CONNECTION_TIMEOUT=5 \
   34     MYSQL_HOST=mysql \
   35     MYSQL_PORT=3306 \
   36     MYSQL_USER=monapi \
   37     MYSQL_PASSWORD=password \
   38     MYSQL_DB=mon \
   39     MEMCACHED_URI=memcached:11211 \
   40     DEFAULT_REGION=RegionOne \
   41     KEYSTONE_IDENTITY_URI=http://keystone:35357 \
   42     KEYSTONE_AUTH_URI=http://keystone:5000 \
   43     KEYSTONE_ADMIN_USER=admin \
   44     KEYSTONE_ADMIN_PASSWORD=secretadmin \
   45     KEYSTONE_ADMIN_TENANT=admin \
   46     KEYSTONE_ADMIN_DOMAIN=default \
   47     KEYSTONE_INSECURE=false \
   48     GUNICORN_WORKERS=9 \
   49     GUNICORN_WORKER_CLASS=gevent \
   50     GUNICORN_WORKER_CONNECTIONS=2000 \
   51     GUNICORN_BACKLOG=1000 \
   52     GUNICORN_TIMEOUT=10 \
   53     ADD_ACCESS_LOG=true \
   54     ACCESS_LOG_FORMAT="%(asctime)s [%(process)d] gunicorn.access [%(levelname)s] %(message)s" \
   55     ACCESS_LOG_FIELDS='%(h)s %(l)s %(u)s %(t)s %(r)s %(s)s %(b)s "%(f)s" "%(a)s" %(L)s' \
   56     LOG_LEVEL_ROOT=WARN \
   57     LOG_LEVEL_CONSOLE=INFO \
   58     LOG_LEVEL_ACCESS=INFO \
   59     STAY_ALIVE_ON_FAILURE=false \
   60     ENABLE_METRICS_API=true \
   61     ENABLE_LOGS_API=false
   62 
   63 # Copy all neccessary files to proper locations.
   64 COPY api-* /etc/monasca/
   65 COPY monasca-api.conf.j2 /etc/monasca/
   66 
   67 # Run here all additionals steps your service need post installation.
   68 # Stay with only one `RUN` and use `&& \` for next steps to don't create
   69 # unnecessary image layers. Clean at the end to conserve space.
   70 #RUN \
   71 #    echo "Some steps to do after main installation." && \
   72 #    echo "Hello when building."
   73 
   74 # Expose port for specific service.
   75 EXPOSE ${MONASCA_CONTAINER_API_PORT}
   76 
   77 # Implement start script in `start.sh` file.
   78 CMD ["/start.sh"]