Add 'self' stack
This commit adds a new stack 'self' that for now just redirects to the repository.
This commit is contained in:
parent
653445225e
commit
56a44f8db3
10 changed files with 69 additions and 7 deletions
|
|
@ -152,6 +152,7 @@ fi
|
||||||
|
|
||||||
# paths to composer things
|
# paths to composer things
|
||||||
DEPLOY_WEB_DIR="$DEPLOY_ROOT/core/web"
|
DEPLOY_WEB_DIR="$DEPLOY_ROOT/core/web"
|
||||||
|
DEPLOY_SELF_DIR="$DEPLOY_ROOT/core/self"
|
||||||
DEPLOY_TRIPLESTORE_DIR="$DEPLOY_ROOT/core/triplestore"
|
DEPLOY_TRIPLESTORE_DIR="$DEPLOY_ROOT/core/triplestore"
|
||||||
DEPLOY_SQL_DIR="$DEPLOY_ROOT/core/sql"
|
DEPLOY_SQL_DIR="$DEPLOY_ROOT/core/sql"
|
||||||
DEPLOY_INSTANCES_DIR="$DEPLOY_ROOT/instances"
|
DEPLOY_INSTANCES_DIR="$DEPLOY_ROOT/instances"
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ sql_bookkeep_insert \
|
||||||
"\"${SLUG}\",\"${INSTANCE_BASE_DIR}\",\"${MYSQL_DATABASE}\",\"${MYSQL_USER}\",\"${MYSQL_PASSWORD}\",\"${GRAPHDB_REPO}\",\"${GRAPHDB_USER}\",\"${GRAPHDB_PASSWORD}\""
|
"\"${SLUG}\",\"${INSTANCE_BASE_DIR}\",\"${MYSQL_DATABASE}\",\"${MYSQL_USER}\",\"${MYSQL_PASSWORD}\",\"${GRAPHDB_REPO}\",\"${GRAPHDB_USER}\",\"${GRAPHDB_PASSWORD}\""
|
||||||
|
|
||||||
log_info " => Writing configuration file"
|
log_info " => Writing configuration file"
|
||||||
load_template "runtime-config/environment" \
|
load_template "docker-env/runtime" \
|
||||||
"REAL_PATH" "${INSTANCE_DATA_DIR}" \
|
"REAL_PATH" "${INSTANCE_DATA_DIR}" \
|
||||||
"VIRTUAL_HOST" "${INSTANCE_DOMAIN}" \
|
"VIRTUAL_HOST" "${INSTANCE_DOMAIN}" \
|
||||||
"LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \
|
"LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
#######################
|
#######################
|
||||||
# Meta Settings
|
# Meta Settings
|
||||||
#######################
|
#######################
|
||||||
|
# The target path to redirect to
|
||||||
# Real path for volumes to be stored
|
TARGET=https://gitlab.cs.fau.de/AGFD/wisski-distillery
|
||||||
REAL_PATH=${REAL_PATH}
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
### Web Server settings
|
### Web Server settings
|
||||||
#######################
|
#######################
|
||||||
# the hostname for the website
|
# the hostname for the website
|
||||||
VIRTUAL_HOST=${VIRTUAL_HOST}
|
VIRTUAL_HOST=example.com
|
||||||
|
|
||||||
# optional letsencrypt support
|
# optional letsencrypt support
|
||||||
# when blank, ignore
|
# when blank, ignore
|
||||||
LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
|
LETSENCRYPT_HOST=
|
||||||
LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
LETSENCRYPT_EMAIL=
|
||||||
22
distillery/resources/compose/self/docker-compose.yml
Normal file
22
distillery/resources/compose/self/docker-compose.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
tr:
|
||||||
|
image: tkw01536/tr
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
# port and hostname for this image to use
|
||||||
|
VIRTUAL_HOST: ${VIRTUAL_HOST}
|
||||||
|
VIRTUAL_PORT: 8080
|
||||||
|
|
||||||
|
# optional letsencrypt email
|
||||||
|
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}
|
||||||
|
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
||||||
|
|
||||||
|
# where to redirect to
|
||||||
|
TARGET: ${TARGET}
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
external:
|
||||||
|
name: distillery
|
||||||
|
|
@ -3,6 +3,8 @@ version: "3.7"
|
||||||
services:
|
services:
|
||||||
nginx-proxy:
|
nginx-proxy:
|
||||||
image: nginxproxy/nginx-proxy:alpine
|
image: nginxproxy/nginx-proxy:alpine
|
||||||
|
environment:
|
||||||
|
- DEFAULT_HOST=${DEFAULT_HOST}
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|
|
||||||
6
distillery/resources/templates/docker-env/runtime
Normal file
6
distillery/resources/templates/docker-env/runtime
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
REAL_PATH=${REAL_PATH}
|
||||||
|
|
||||||
|
VIRTUAL_HOST=${VIRTUAL_HOST}
|
||||||
|
|
||||||
|
LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
|
||||||
|
LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
||||||
6
distillery/resources/templates/docker-env/self
Normal file
6
distillery/resources/templates/docker-env/self
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
VIRTUAL_HOST=${VIRTUAL_HOST}
|
||||||
|
|
||||||
|
LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
|
||||||
|
LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
||||||
|
|
||||||
|
TARGET=https://gitlab.cs.fau.de/AGFD/wisski-distillery
|
||||||
1
distillery/resources/templates/docker-env/web
Normal file
1
distillery/resources/templates/docker-env/web
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
DEFAULT_HOST=${DEFAULT_HOST}
|
||||||
|
|
@ -48,6 +48,7 @@ pip3 install --upgrade docker-compose
|
||||||
log_info "=> Creating docker-compose directories"
|
log_info "=> Creating docker-compose directories"
|
||||||
mkdir -p "$DEPLOY_INSTANCES_DIR"
|
mkdir -p "$DEPLOY_INSTANCES_DIR"
|
||||||
mkdir -p "$DEPLOY_WEB_DIR"
|
mkdir -p "$DEPLOY_WEB_DIR"
|
||||||
|
mkdir -p "$DEPLOY_SELF_DIR"
|
||||||
mkdir -p "$DEPLOY_TRIPLESTORE_DIR"
|
mkdir -p "$DEPLOY_TRIPLESTORE_DIR"
|
||||||
mkdir -p "$DEPLOY_SQL_DIR"
|
mkdir -p "$DEPLOY_SQL_DIR"
|
||||||
|
|
||||||
|
|
@ -57,6 +58,27 @@ docker network create distillery || true
|
||||||
log_info "=> Creating 'docker-compose' files for the 'web'. "
|
log_info "=> Creating 'docker-compose' files for the 'web'. "
|
||||||
install_resource_dir "compose/web" "$DEPLOY_WEB_DIR"
|
install_resource_dir "compose/web" "$DEPLOY_WEB_DIR"
|
||||||
|
|
||||||
|
log_info " => Writing 'web' configuration file"
|
||||||
|
load_template "docker-env/web" \
|
||||||
|
"DEFAULT_HOST" "${DEFAULT_DOMAIN}" \
|
||||||
|
> "$DEPLOY_WEB_DIR/.env"
|
||||||
|
|
||||||
|
log_info "=> Creating 'docker-compose' files for the 'self'. "
|
||||||
|
install_resource_dir "compose/self" "$DEPLOY_SELF_DIR"
|
||||||
|
|
||||||
|
# setup the lesencrypt host for the default domain
|
||||||
|
if [ -n "$LETSENCRYPT_HOST" ]; then
|
||||||
|
LETSENCRYPT_HOST="$DEFAULT_DOMAIN"
|
||||||
|
fi;
|
||||||
|
|
||||||
|
log_info " => Writing 'self' configuration file"
|
||||||
|
load_template "docker-env/self" \
|
||||||
|
"VIRTUAL_HOST" "${DEFAULT_DOMAIN}" \
|
||||||
|
"LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \
|
||||||
|
"LETSENCRYPT_EMAIL" "${LETSENCRYPT_EMAIL}" \
|
||||||
|
> "$DEPLOY_SELF_DIR/.env"
|
||||||
|
|
||||||
|
|
||||||
# copy over the directory
|
# copy over the directory
|
||||||
log_info "=> Creating 'docker-compose' files for the 'triplestore'. "
|
log_info "=> Creating 'docker-compose' files for the 'triplestore'. "
|
||||||
install_resource_dir "compose/triplestore" "$DEPLOY_TRIPLESTORE_DIR"
|
install_resource_dir "compose/triplestore" "$DEPLOY_TRIPLESTORE_DIR"
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ function update_stack() {
|
||||||
log_info "=> Rebuilding and restarting 'web' stack"
|
log_info "=> Rebuilding and restarting 'web' stack"
|
||||||
update_stack "$DEPLOY_WEB_DIR"
|
update_stack "$DEPLOY_WEB_DIR"
|
||||||
|
|
||||||
|
log_info "=> Rebuilding and restarting 'self' stack"
|
||||||
|
update_stack "$DEPLOY_SELF_DIR"
|
||||||
|
|
||||||
# build and start the triplestore
|
# build and start the triplestore
|
||||||
log_info "=> Rebuilding and restarting 'triplestore' stack"
|
log_info "=> Rebuilding and restarting 'triplestore' stack"
|
||||||
update_stack "$DEPLOY_TRIPLESTORE_DIR"
|
update_stack "$DEPLOY_TRIPLESTORE_DIR"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue