Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/managed_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build, Publish and Scan (Managed)
on:
workflow_dispatch:
push:
branches: ["main", "master", "develop"]
pull_request:
branches: ["main", "master", "develop"]
release:
types: [published]
jobs:
build-publish-scan:
uses: BERDataLakehouse/.github/.github/workflows/build_publish_scan.yaml@main
Comment thread
bio-boris marked this conversation as resolved.
Comment thread
bio-boris marked this conversation as resolved.
Comment thread
bio-boris marked this conversation as resolved.
permissions:
contents: read
packages: write
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 29 additions & 51 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,51 +1,29 @@
FROM openresty/openresty:buster

# These ARGs values are passed in via the docker build command
ARG BUILD_DATE
ARG VCS_REF
ARG BRANCH

COPY deployment/ /kb/deployment/

#RUN cp /kb/deployment/conf/sources.list /etc/apt/sources.list && \
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
software-properties-common ca-certificates apt-transport-https curl net-tools wget

RUN rm -rf /etc/nginx && \
ln -s /usr/local/openresty/nginx/conf /etc/nginx && \
cd /etc/nginx && \
mkdir ssl /var/log/nginx && \
mkdir /usr/local/openresty/nginx/conf/conf.d && \
openssl req -x509 -newkey rsa:4096 -keyout ssl/key.pem -out ssl/cert.pem -days 365 -nodes \
-subj '/C=US/ST=California/L=Berkeley/O=Lawrence Berkeley National Lab/OU=KBase/CN=localhost' && \
cd /tmp && \
wget -N https://github.com/kbase/dockerize/raw/master/dockerize-linux-amd64-v0.6.1.tar.gz && \
tar xvzf dockerize-linux-amd64-v0.6.1.tar.gz && \
rm dockerize-linux-amd64-v0.6.1.tar.gz && \
mv dockerize /kb/deployment/bin

COPY nginx-sites.d/ /usr/local/openresty/nginx/conf/sites-enabled


# The BUILD_DATE value seem to bust the docker cache when the timestamp changes, move to
# the end
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/kbase/nginx.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0-rc1" \
us.kbase.vcs-branch=$BRANCH \
maintainer="Steve Chan sychan@lbl.gov"


ENTRYPOINT [ "/kb/deployment/bin/dockerize" ]

# Here are some default params passed to dockerize. They would typically
# be overidden by docker-compose at startup
CMD [ "-template", "/kb/deployment/conf/.templates/openresty.conf.templ:/etc/nginx/nginx.conf", \
"-template", "/kb/deployment/conf/.templates/minikb-narrative.templ:/etc/nginx/sites-enabled/minikb-narrative", \
"-env", "/kb/deployment/conf/localhost.ini", \
"-stdout", "/var/log/nginx/access.log", \
"-stdout", "/var/log/nginx/error.log", \
"nginx" ]
FROM openresty/openresty:1.29.2.4-alpine-fat@sha256:af355ebd6f01e580823b6718e8a2e39be3b45d9437fc92144e43ac72020f7461
Comment thread
kkellerlbl marked this conversation as resolved.
ENV DEBIAN_FRONTEND=noninteractive
Comment thread
bio-boris marked this conversation as resolved.

COPY deployment /kb/deployment

RUN apk update && \
apk upgrade && \
apk add --no-cache \
curl vim htop wget \
pcre openssl zlib ca-certificates && \
rm -rf /var/cache/apk/*
Comment thread
bio-boris marked this conversation as resolved.

RUN mkdir -p /etc/nginx/ssl /etc/nginx/conf.d /etc/nginx/sites-enabled /var/log/nginx && \
touch /var/log/nginx/access.log /var/log/nginx/error.log
Comment thread
bio-boris marked this conversation as resolved.

RUN rm -f /usr/local/openresty/nginx/conf/nginx.conf \
/etc/nginx/conf.d/default.conf

RUN ln -s /usr/local/openresty/nginx/conf/mime.types /etc/nginx/mime.types


RUN mkdir -p /kb/deployment/bin && \
wget -O /tmp/dockerize.tar.gz \
https://github.com/kbase/dockerize/raw/master/dockerize-linux-amd64-v0.6.1.tar.gz && \
tar xzf /tmp/dockerize.tar.gz -C /tmp && \
mv /tmp/dockerize /kb/deployment/bin/ && \
rm /tmp/dockerize.tar.gz
Comment thread
bio-boris marked this conversation as resolved.
Comment thread
bio-boris marked this conversation as resolved.

ENTRYPOINT [ "/kb/deployment/bin/dockerize" ]
15 changes: 0 additions & 15 deletions Makefile

This file was deleted.

7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
# nginx
Version of standard nginx image that supports KBase configuration

# Passing environment variables through Nginx to the narrative containers

This section is no longer relevant. Narrative containers (and their environment variables) are managed by traefiker.
# NGINX
Comment thread
bio-boris marked this conversation as resolved.
1 change: 0 additions & 1 deletion deployment/bin/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions deployment/conf/localhost.crt

This file was deleted.

1 change: 0 additions & 1 deletion deployment/conf/localhost.ini

This file was deleted.

27 changes: 0 additions & 27 deletions deployment/conf/localhost.key

This file was deleted.

2 changes: 0 additions & 2 deletions deployment/conf/sources.list

This file was deleted.

Loading
Loading