initial import for Open Source 🎉
This commit is contained in:
parent
1898c361f3
commit
9c0dd3b722
2048 changed files with 218743 additions and 0 deletions
22
config_app/init/certs_create.sh
Executable file
22
config_app/init/certs_create.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
QUAYPATH=${QUAYPATH:-"."}
|
||||
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
|
||||
cd ${QUAYDIR:-"/"}
|
||||
|
||||
if [ -f "$QUAYCONF/stack/ssl.key" ] && [ -f "$QUAYCONF/stack/ssl.cert" ]; then
|
||||
echo 'Using mounted ssl certs for quay-config app'
|
||||
cp $QUAYCONF/stack/ssl.key $QUAYDIR/config_app/quay-config.key
|
||||
cp $QUAYCONF/stack/ssl.cert $QUAYDIR/config_app/quay-config.cert
|
||||
else
|
||||
echo 'Creating self-signed certs for quay-config app'
|
||||
|
||||
# Create certs to secure connections while uploading config for secrets
|
||||
# echo '{"CN":"CA","key":{"algo":"rsa","size":2048}}' | cfssl gencert -initca - | cfssljson -bare quay-config
|
||||
mkdir -p /certificates; cd /certificates
|
||||
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 \
|
||||
-subj "/C=US/ST=NY/L=NYC/O=Dis/CN=self-signed" \
|
||||
-keyout quay-config-key.pem -out quay-config.pem
|
||||
cp /certificates/quay-config-key.pem $QUAYDIR/config_app/quay-config.key
|
||||
cp /certificates/quay-config.pem $QUAYDIR/config_app/quay-config.cert
|
||||
fi
|
11
config_app/init/service/gunicorn_web/run
Executable file
11
config_app/init/service/gunicorn_web/run
Executable file
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
echo 'Starting gunicon'
|
||||
|
||||
QUAYPATH=${QUAYPATH:-"."}
|
||||
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
|
||||
|
||||
cd ${QUAYDIR:-"/"}
|
||||
PYTHONPATH=$QUAYPATH venv/bin/gunicorn -c $QUAYDIR/config_app/conf/gunicorn_web.py config_application:application
|
||||
|
||||
echo 'Gunicorn exited'
|
12
config_app/init/service/nginx/run
Executable file
12
config_app/init/service/nginx/run
Executable file
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
echo 'Starting nginx'
|
||||
|
||||
QUAYPATH=${QUAYPATH:-"."}
|
||||
cd ${QUAYDIR:-"/"}
|
||||
PYTHONPATH=$QUAYPATH
|
||||
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
|
||||
|
||||
/usr/sbin/nginx -c $QUAYDIR/config_app/conf/nginx.conf
|
||||
|
||||
echo 'Nginx exited'
|
Reference in a new issue