diff --git a/.gitignore b/.gitignore index 58a6ae60b6..79b709cbf1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ local-dev/helm minishift minikube k3d -kubectl +local-dev/kubectl **/v8-* node_modules/ build/* diff --git a/Jenkinsfile b/Jenkinsfile index 98cca1ef14..cdf03c330d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,7 +57,7 @@ node { } stage ('build images') { - sh script: "make -O${SYNC_MAKE_OUTPUT} -j6 build", label: "Building images" + sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 build", label: "Building images" } try { @@ -70,6 +70,7 @@ node { sh script: "make k3d K3S_VERSION=${kubernetes_version['k3s']} KUBECTL_VERSION=${kubernetes_version['kubectl']}", label: "Making k3d" sh script: "make -O${SYNC_MAKE_OUTPUT} k8s-tests -j2", label: "Making kubernetes tests" sh script: "make -O${SYNC_MAKE_OUTPUT} controller-k8s-tests -j2", label: "Making controller based kubernetes tests" + sh script: "make k3d/cleanall", label: "Removing kubernetes install" } catch (e) { echo "Something went wrong, trying to cleanup" cleanup() @@ -86,7 +87,7 @@ node { sh 'make minishift/cleanall || echo' sh script: "make minishift MINISHIFT_GITHUB_API_TOKEN=$MINISHIFT_GITHUB_API_TOKEN MINISHIFT_CPUS=\$(nproc --ignore 3) MINISHIFT_MEMORY=24GB MINISHIFT_DISK_SIZE=70GB MINISHIFT_VERSION=${minishift_version} OPENSHIFT_VERSION=${openshift_version}", label: "Making openshift" sh script: "make -O${SYNC_MAKE_OUTPUT} push-minishift -j5", label: "Pushing built images into openshift" - sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j2", label: "Making openshift tests" + sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j1", label: "Making openshift tests" } } catch (e) { echo "Something went wrong, trying to cleanup" @@ -119,10 +120,15 @@ node { try { if (env.SKIP_IMAGE_PUBLISH != 'true') { sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" - sh script: "make -O${SYNC_MAKE_OUTPUT} -j4 publish-amazeeiolagoon-baseimages publish-amazeeiolagoon-serviceimages publish-amazeeiolagoon-taskimages BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" + sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 publish-amazeeiolagoon-baseimages publish-amazeeiolagoon-serviceimages publish-amazeeiolagoon-taskimages BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" } else { sh script: 'echo "skipped because of SKIP_IMAGE_PUBLISH env variable"', label: "Skipping image publishing" } + if (env.BRANCH_NAME == 'main' ) { + withCredentials([string(credentialsId: 'vshn-gitlab-helmfile-ci-trigger', variable: 'TOKEN')]) { + sh script: "curl -X POST -F token=$TOKEN -F ref=master https://git.vshn.net/api/v4/projects/1263/trigger/pipeline", label: "Trigger lagoon-core helmfile sync on amazeeio-test6" + } + } } catch (e) { echo "Something went wrong, trying to cleanup" cleanup() @@ -142,12 +148,12 @@ node { stage ('publish-amazeeio') { withCredentials([string(credentialsId: 'amazeeiojenkins-dockerhub-password', variable: 'PASSWORD')]) { sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" - sh script: "make -O${SYNC_MAKE_OUTPUT} -j4 publish-amazeeio-baseimages", label: "Publishing built images" + sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 publish-amazeeio-baseimages publish-amazeeio-taskimages", label: "Publishing legacy images to amazeeio" } } } - if (env.BRANCH_NAME == 'master' && env.SKIP_IMAGE_PUBLISH != 'true') { + if (env.BRANCH_NAME == 'main' && env.SKIP_IMAGE_PUBLISH != 'true') { stage ('save-images-s3') { sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 s3-save", label: "Saving images to AWS S3" } diff --git a/Makefile b/Makefile index 661d61c796..ee46f74f4b 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,9 @@ DOCKER_BUILD_PARAMS := --quiet # CI systems to define an Environment variable CI_BUILD_TAG which uniquely identifies each build. # If it's not set we assume that we are running local and just call it lagoon. CI_BUILD_TAG ?= lagoon +# SOURCE_REPO is the repos where the upstream images are found (usually uselagoon, but can substiture for testlagoon) +UPSTREAM_REPO ?= uselagoon +UPSTREAM_TAG ?= latest # Local environment ARCH := $(shell uname | tr '[:upper:]' '[:lower:]') @@ -95,26 +98,7 @@ DEFAULT_ALPINE_VERSION := 3.11 # Builds a docker image. Expects as arguments: name of the image, location of Dockerfile, path of # Docker Build Context -docker_build = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg ALPINE_VERSION=$(DEFAULT_ALPINE_VERSION) -t $(CI_BUILD_TAG)/$(1) -f $(2) $(3) - -# Build a Python docker image. Expects as arguments: -# 1. Python version -# 2. Location of Dockerfile -# 3. Path of Docker Build context -docker_build_python = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PYTHON_VERSION=$(1) --build-arg ALPINE_VERSION=$(2) -t $(CI_BUILD_TAG)/python:$(3) -f $(4) $(5) - -docker_build_elastic = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) -t $(CI_BUILD_TAG)/$(2):$(1) -f $(3) $(4) - -# Build a PHP docker image. Expects as arguments: -# 1. PHP version -# 2. PHP version and type of image (ie 7.3-fpm, 7.3-cli etc) -# 3. Location of Dockerfile -# 4. Path of Docker Build Context -docker_build_php = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PHP_VERSION=$(1) --build-arg PHP_IMAGE_VERSION=$(1) --build-arg ALPINE_VERSION=$(2) -t $(CI_BUILD_TAG)/php:$(3) -f $(4) $(5) - -docker_build_node = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg NODE_VERSION=$(1) --build-arg ALPINE_VERSION=$(2) -t $(CI_BUILD_TAG)/node:$(3) -f $(4) $(5) - -docker_build_solr = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg SOLR_MAJ_MIN_VERSION=$(1) -t $(CI_BUILD_TAG)/solr:$(2) -f $(3) $(4) +docker_build = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg UPSTREAM_REPO=$(UPSTREAM_REPO) --build-arg UPSTREAM_TAG=$(UPSTREAM_TAG) --build-arg ALPINE_VERSION=$(DEFAULT_ALPINE_VERSION) -t $(CI_BUILD_TAG)/$(1) -f $(2) $(3) # Tags an image with the `amazeeio` repository and pushes it docker_publish_amazeeio = docker tag $(CI_BUILD_TAG)/$(1) amazeeio/$(2) && docker push amazeeio/$(2) | cat @@ -130,29 +114,13 @@ docker_publish_amazeeiolagoon = docker tag $(CI_BUILD_TAG)/$(1) amazeeiolagoon/$ images := oc \ kubectl \ - mariadb \ - mariadb-drupal \ - postgres \ - postgres-ckan \ - postgres-drupal \ oc-build-deploy-dind \ kubectl-build-deploy-dind \ - commons \ - nginx \ - nginx-drupal \ - varnish \ - varnish-drupal \ - varnish-persistent \ - varnish-persistent-drupal \ - redis \ - redis-persistent \ rabbitmq \ rabbitmq-cluster \ - mongo \ athenapdf-service \ curator \ - docker-host \ - toolbox + docker-host # base-images is a variable that will be constantly filled with all base image there are base-images += $(images) @@ -176,217 +144,17 @@ $(build-images): # if the parent has been built # 2. Dockerfiles of the Images itself, will cause make to rebuild the images if something has # changed on the Dockerfiles -build/mariadb: build/commons images/mariadb/Dockerfile -build/mariadb-drupal: build/mariadb images/mariadb-drupal/Dockerfile -build/postgres: build/commons images/postgres/Dockerfile -build/postgres-ckan: build/postgres images/postgres-ckan/Dockerfile -build/postgres-drupal: build/postgres images/postgres-drupal/Dockerfile -build/commons: images/commons/Dockerfile -build/nginx: build/commons images/nginx/Dockerfile -build/nginx-drupal: build/nginx images/nginx-drupal/Dockerfile -build/varnish: build/commons images/varnish/Dockerfile -build/varnish-drupal: build/varnish images/varnish-drupal/Dockerfile -build/varnish-persistent: build/varnish images/varnish/Dockerfile -build/varnish-persistent-drupal: build/varnish-persistent images/varnish-drupal/Dockerfile -build/redis: build/commons images/redis/Dockerfile -build/redis-persistent: build/redis images/redis-persistent/Dockerfile -build/rabbitmq: build/commons images/rabbitmq/Dockerfile +build/rabbitmq: images/rabbitmq/Dockerfile build/rabbitmq-cluster: build/rabbitmq images/rabbitmq-cluster/Dockerfile -build/mongo: build/commons images/mongo/Dockerfile -build/docker-host: build/commons images/docker-host/Dockerfile -build/oc: build/commons images/oc/Dockerfile -build/kubectl: build/commons images/kubectl/Dockerfile -build/curator: build/commons images/curator/Dockerfile +build/docker-host: images/docker-host/Dockerfile +build/oc: images/oc/Dockerfile +build/kubectl: images/kubectl/Dockerfile +build/curator: images/curator/Dockerfile build/oc-build-deploy-dind: build/oc images/oc-build-deploy-dind -build/athenapdf-service: build/commons images/athenapdf-service/Dockerfile -build/toolbox: build/commons images/toolbox/Dockerfile +build/athenapdf-service:images/athenapdf-service/Dockerfile build/kubectl-build-deploy-dind: build/kubectl images/kubectl-build-deploy-dind -####### -####### Elastic Images -####### - -elasticimages := elasticsearch__6 \ - elasticsearch__7 \ - kibana__6 \ - kibana__7 \ - logstash__6 \ - logstash__7 - -build-elasticimages = $(foreach image,$(elasticimages),build/$(image)) - -# Define the make recipe for all base images -$(build-elasticimages): build/commons - $(eval clean = $(subst build/,,$@)) - $(eval tool = $(word 1,$(subst __, ,$(clean)))) - $(eval version = $(word 2,$(subst __, ,$(clean)))) -# Call the docker build - $(call docker_build_elastic,$(version),$(tool),images/$(tool)/Dockerfile$(version),images/$(tool)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(elasticimages) -s3-images += $(elasticimages) - -build/elasticsearch__6 build/elasticsearch__7 build/kibana__6 build/kibana__7 build/logstash__6 build/logstash__7: images/commons - -####### -####### Python Images -####### -####### Python Images are alpine linux based Python images. - -pythonimages := python__2.7 \ - python__3.7 \ - python__2.7-ckan \ - python__2.7-ckandatapusher - -build-pythonimages = $(foreach image,$(pythonimages),build/$(image)) - -# Define the make recipe for all base images -$(build-pythonimages): build/commons - $(eval clean = $(subst build/python__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) - $(eval alpine_version = $(DEFAULT_ALPINE_VERSION)) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) -# Call the docker build - $(call docker_build_python,$(version),$(alpine_version),$(version)$(type_dash),images/python$(type_dash)/Dockerfile,images/python$(type_dash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(pythonimages) -s3-images += $(pythonimages) - -build/python__2.7 build/python__3.7: images/commons -build/python__2.7-ckan: build/python__2.7 -build/python__2.7-ckandatapusher: build/python__2.7 - - -####### -####### PHP Images -####### -####### PHP Images are alpine linux based PHP images. - -phpimages := php__7.2-fpm \ - php__7.3-fpm \ - php__7.4-fpm \ - php__7.2-cli \ - php__7.3-cli \ - php__7.4-cli \ - php__7.2-cli-drupal \ - php__7.3-cli-drupal \ - php__7.4-cli-drupal - - -build-phpimages = $(foreach image,$(phpimages),build/$(image)) - -# Define the make recipe for all base images -$(build-phpimages): build/commons - $(eval clean = $(subst build/php__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) - $(eval subtype = $(word 3,$(subst -, ,$(clean)))) - $(eval alpine_version := $(shell case $(version) in (5.6) echo "3.8" ;; (7.0) echo "3.7" ;; (7.1) echo "3.10" ;; (*) echo $(DEFAULT_ALPINE_VERSION) ;; esac )) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) - $(eval type_slash = $(if $(type),/$(type))) -# if there is a subtype, add it. If not, just keep what we already had - $(eval type_dash = $(if $(subtype),-$(type)-$(subtype),$(type_dash))) - $(eval type_slash = $(if $(subtype),/$(type)-$(subtype),$(type_slash))) - -# Call the docker build - $(call docker_build_php,$(version),$(alpine_version),$(version)$(type_dash),images/php$(type_slash)/Dockerfile,images/php$(type_slash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(phpimages) -s3-images += $(phpimages) - -build/php__7.2-fpm build/php__7.3-fpm build/php__7.4-fpm: images/commons -build/php__7.2-cli: build/php__7.2-fpm -build/php__7.3-cli: build/php__7.3-fpm -build/php__7.4-cli: build/php__7.4-fpm -build/php__7.2-cli-drupal: build/php__7.2-cli -build/php__7.3-cli-drupal: build/php__7.3-cli -build/php__7.4-cli-drupal: build/php__7.4-cli - -####### -####### Solr Images -####### -####### Solr Images are alpine linux based Solr images. - -solrimages := solr__5.5 \ - solr__6.6 \ - solr__7.7 \ - solr__5.5-drupal \ - solr__6.6-drupal \ - solr__7.7-drupal \ - solr__5.5-ckan \ - solr__6.6-ckan - - -build-solrimages = $(foreach image,$(solrimages),build/$(image)) - -# Define the make recipe for all base images -$(build-solrimages): build/commons - $(eval clean = $(subst build/solr__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) -# Call the docker build - $(call docker_build_solr,$(version),$(version)$(type_dash),images/solr$(type_dash)/Dockerfile,images/solr$(type_dash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(solrimages) -s3-images += $(solrimages) - -build/solr__5.5 build/solr__6.6 build/solr__7.7: images/commons -build/solr__5.5-drupal: build/solr__5.5 -build/solr__6.6-drupal: build/solr__6.6 -build/solr__7.7-drupal: build/solr__7.7 -build/solr__5.5-ckan: build/solr__5.5 -build/solr__6.6-ckan: build/solr__6.6 - -####### -####### Node Images -####### -####### Node Images are alpine linux based Node images. - -nodeimages := node__14 \ - node__12 \ - node__10 \ - node__14-builder \ - node__12-builder \ - node__10-builder \ - -build-nodeimages = $(foreach image,$(nodeimages),build/$(image)) - -# Define the make recipe for all base images -$(build-nodeimages): build/commons - $(eval clean = $(subst build/node__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) - $(eval alpine_version := $(shell case $(version) in (6) echo "" ;; (9) echo "" ;; (*) echo $(DEFAULT_ALPINE_VERSION) ;; esac )) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) - $(eval type_slash = $(if $(type),/$(type))) -# Call the docker build - $(call docker_build_node,$(version),$(alpine_version),$(version)$(type_dash),images/node$(type_slash)/Dockerfile,images/node$(type_slash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(nodeimages) -s3-images += $(nodeimages) - -build/node__10 build/node__12 build/node__14: images/commons images/node/Dockerfile -build/node__14-builder: build/node__14 images/node/builder/Dockerfile -build/node__12-builder: build/node__12 images/node/builder/Dockerfile -build/node__10-builder: build/node__10 images/node/builder/Dockerfile - ####### ####### Service Images ####### @@ -396,7 +164,7 @@ build/node__10-builder: build/node__10 images/node/builder/Dockerfile # Yarn Workspace Image which builds the Yarn Workspace within a single image. This image will be # used by all microservices based on Node.js to not build similar node packages again build-images += yarn-workspace-builder -build/yarn-workspace-builder: build/node__10-builder images/yarn-workspace-builder/Dockerfile +build/yarn-workspace-builder: images/yarn-workspace-builder/Dockerfile $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),images/$(image)/Dockerfile,.) touch $@ @@ -425,56 +193,57 @@ $(build-taskimages): touch $@ # Variables of service images we manage and build -services := api \ - auth-server \ - logs2email \ - logs2slack \ - logs2rocketchat \ - logs2microsoftteams \ - openshiftbuilddeploy \ - openshiftbuilddeploymonitor \ - openshiftjobs \ - openshiftjobsmonitor \ - openshiftmisc \ - openshiftremove \ - kubernetesbuilddeploy \ - kubernetesdeployqueue \ - kubernetesbuilddeploymonitor \ - kubernetesjobs \ - kubernetesjobsmonitor \ - kubernetesmisc \ - kubernetesremove \ - controllerhandler \ - webhook-handler \ - webhooks2tasks \ - backup-handler \ - broker \ - broker-single \ - logs-concentrator \ - logs-dispatcher \ - logs-tee \ - logs-forwarder \ - logs-db \ - logs-db-ui \ - logs-db-curator \ - logs2logs-db \ - auto-idler \ - storage-calculator \ - api-db \ - drush-alias \ - keycloak \ - keycloak-db \ - ui \ - harbor-core \ - harbor-database \ - harbor-jobservice \ - harbor-nginx \ - harbor-portal \ - harbor-redis \ - harborregistry \ - harborregistryctl \ - harbor-trivy \ - api-redis +services := api \ + api-db \ + api-redis \ + auth-server \ + auto-idler \ + backup-handler \ + broker \ + broker-single \ + controllerhandler \ + drush-alias \ + harbor-core \ + harbor-database \ + harbor-jobservice \ + harbor-nginx \ + harbor-portal \ + harbor-redis \ + harbor-trivy \ + harborregistry \ + harborregistryctl \ + keycloak \ + keycloak-db \ + kubernetesbuilddeploy \ + kubernetesbuilddeploymonitor \ + kubernetesdeployqueue \ + kubernetesjobs \ + kubernetesjobsmonitor \ + kubernetesmisc \ + kubernetesremove \ + logs-concentrator \ + logs-db \ + logs-db-curator \ + logs-db-ui \ + logs-dispatcher \ + logs-forwarder \ + logs-tee \ + logs2email \ + logs2logs-db \ + logs2microsoftteams \ + logs2rocketchat \ + logs2slack \ + openshiftbuilddeploy \ + openshiftbuilddeploymonitor \ + openshiftjobs \ + openshiftjobsmonitor \ + openshiftmisc \ + openshiftremove \ + storage-calculator \ + ui \ + webhook-handler \ + webhooks2tasks + service-images += $(services) @@ -488,40 +257,52 @@ $(build-services): # Dependencies of Service Images build/auth-server build/logs2email build/logs2slack build/logs2rocketchat build/logs2microsoftteams build/openshiftbuilddeploy build/openshiftbuilddeploymonitor build/openshiftjobs build/openshiftjobsmonitor build/openshiftmisc build/openshiftremove build/backup-handler build/kubernetesbuilddeploy build/kubernetesdeployqueue build/kubernetesbuilddeploymonitor build/kubernetesjobs build/kubernetesjobsmonitor build/kubernetesmisc build/kubernetesremove build/controllerhandler build/webhook-handler build/webhooks2tasks build/api build/ui: build/yarn-workspace-builder -build/logs2logs-db: build/logstash__7 -build/logs-db: build/elasticsearch__7 -build/logs-db-ui: build/kibana__7 -build/logs-db-curator: build/curator +build/api-db: services/api-db/Dockerfile +build/api-redis: services/api-redis/Dockerfile build/auto-idler: build/oc -build/storage-calculator: build/oc -build/api-db build/keycloak-db: build/mariadb -build/broker: build/rabbitmq-cluster build/broker-single build/broker-single: build/rabbitmq -build/drush-alias: build/nginx -build/keycloak: build/commons -build/harbor-database: build/postgres -build/harbor-trivy build/local-minio: build/harbor-database services/harbor-redis/Dockerfile -build/harborregistry: services/harbor-jobservice/Dockerfile -build/harborregistryctl: build/harborregistry -build/harbor-nginx: build/harborregistryctl services/harbor-core/Dockerfile services/harbor-portal/Dockerfile -build/tests: build/python__2.7 -build/tests-kubernetes: build/tests +build/broker: build/rabbitmq-cluster build/broker-single +build/drush-alias: services/drush-alias/Dockerfile +build/harbor-core: services/harbor-core/Dockerfile +build/harbor-database: services/harbor-database/Dockerfile +build/harbor-jobservice: services/harbor-jobservice/Dockerfile +build/harbor-nginx: services/harbor-nginx/Dockerfile +build/harbor-portal: services/harbor-portal/Dockerfile +build/harbor-redis: services/harbor-redis/Dockerfile +build/harbor-trivy: services/harbor-trivy/Dockerfile +build/harborregistry: services/harborregistry/Dockerfile +build/harborregistryctl: services/harborregistryctl/Dockerfile +build/keycloak-db: services/keycloak-db/Dockerfile +build/keycloak: services/keycloak/Dockerfile +build/logs-concentrator: services/logs-concentrator/Dockerfile +build/logs-db-curator: build/curator +build/logs-db-ui: services/logs-db-ui/Dockerfile +build/logs-db: services/logs-db/Dockerfile +build/logs-dispatcher: services/logs-dispatcher/Dockerfile +build/logs-forwarder: services/logs-forwarder/Dockerfile +build/logs-tee: services/logs-tee/Dockerfile +build/logs2logs-db: services/logs2logs-db/Dockerfile +build/storage-calculator: build/oc build/tests-controller-kubernetes: build/tests +build/tests-kubernetes: build/tests build/tests-openshift: build/tests -build/toolbox: build/mariadb -build/api-redis: build/redis - +build/tests: tests/Dockerfile # Auth SSH needs the context of the root folder, so we have it individually -build/ssh: build/commons +build/ssh: services/ssh/Dockerfile $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),services/$(image)/Dockerfile,.) touch $@ service-images += ssh +build/local-git: local-dev/git/Dockerfile +build/local-api-data-watcher-pusher: local-dev/api-data-watcher-pusher/Dockerfile +build/local-registry: local-dev/registry/Dockerfile +build/local-dbaas-provider: local-dev/dbaas-provider/Dockerfile + # Images for local helpers that exist in another folder than the service images localdevimages := local-git \ local-api-data-watcher-pusher \ - local-registry\ + local-registry \ local-dbaas-provider service-images += $(localdevimages) build-localdevimages = $(foreach image,$(localdevimages),build/$(image)) @@ -548,7 +329,7 @@ s3-images += $(service-images) # Builds all Images .PHONY: build -build: $(foreach image,$(base-images) $(base-images-with-versions) $(service-images) $(task-images),build/$(image)) +build: $(foreach image,$(base-images) $(service-images) $(task-images),build/$(image)) # Outputs a list of all Images we manage .PHONY: build-list build-list: @@ -557,10 +338,11 @@ build-list: done # Define list of all tests -all-k8s-tests-list:= features-kubernetes \ - nginx \ +all-k8s-tests-list:= nginx \ drupal \ - active-standby-kubernetes + active-standby-kubernetes \ + features-kubernetes + all-k8s-tests = $(foreach image,$(all-k8s-tests-list),k8s-tests/$(image)) # Run all k8s tests @@ -571,7 +353,7 @@ k8s-tests: $(all-k8s-tests) $(all-k8s-tests): k3d kubernetes-test-services-up $(MAKE) push-local-registry -j6 $(eval testname = $(subst k8s-tests/,,$@)) - IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility run --rm \ + IMAGE_REPO=$(CI_BUILD_TAG) UPSTREAM_REPO=$(UPSTREAM_REPO) UPSTREAM_TAG=$(UPSTREAM_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility run --rm \ tests-kubernetes ansible-playbook --skip-tags="skip-on-kubernetes" \ /ansible/tests/$(testname).yaml \ --extra-vars \ @@ -601,7 +383,7 @@ $(all-controller-k8s-tests): k3d controller-k8s-test-services-up jq -rcsR '{kubeconfig: .}')" # push command of our base images into minishift -push-local-registry-images = $(foreach image,$(base-images) $(base-images-with-versions) $(task-images),[push-local-registry]-$(image)) +push-local-registry-images = $(foreach image,$(base-images) $(task-images),[push-local-registry]-$(image)) # tag and push all images .PHONY: push-local-registry push-local-registry: $(push-local-registry-images) @@ -646,7 +428,7 @@ wait-for-keycloak: grep -m 1 "Config of Keycloak done." <(docker-compose -p $(CI_BUILD_TAG) --compatibility logs -f keycloak 2>&1) # Define a list of which Lagoon Services are needed for running any deployment testing -main-test-services = broker logs2email logs2slack logs2rocketchat logs2microsoftteams api api-db keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher harbor-core harbor-database harbor-jobservice harbor-portal harbor-nginx harbor-redis harborregistry harborregistryctl harbor-trivy local-minio +main-test-services = broker logs2email logs2slack logs2rocketchat logs2microsoftteams api api-db keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher harbor-core harbor-database harbor-jobservice harbor-portal harbor-nginx harbor-redis harborregistry harborregistryctl harbor-trivy # Define a list of which Lagoon Services are needed for openshift testing openshift-test-services = openshiftremove openshiftbuilddeploy openshiftbuilddeploymonitor openshiftmisc tests-openshift @@ -671,7 +453,6 @@ api-tests = node features-openshift features-kubernetes nginx elasticsearch acti # All drupal tests drupal-tests = drupal drupal-postgres -drupal-dependencies = build/varnish-drupal build/solr__5.5-drupal build/nginx-drupal build/redis build/php__7.2-cli-drupal build/php__7.3-cli-drupal build/php__7.4-cli-drupal build/postgres-drupal build/mariadb-drupal # These targets are used as dependencies to bring up containers in the right order. .PHONY: main-test-services-up @@ -744,7 +525,7 @@ end2end-tests/clean: docker-compose -f docker-compose.yaml -f docker-compose.end2end.yaml -p end2end --compatibility down -v # push command of our base images into minishift -push-minishift-images = $(foreach image,$(base-images) $(base-images-with-versions),[push-minishift]-$(image)) +push-minishift-images = $(foreach image,$(base-images),[push-minishift]-$(image)) # tag and push all images .PHONY: push-minishift push-minishift: minishift/login-docker-registry $(push-minishift-images) @@ -770,52 +551,53 @@ lagoon-kickstart: $(foreach image,$(deployment-test-services-rest),build/$(image make logs # Start only the local Harbor for testing purposes -local-harbor: build/harbor-core build/harbor-database build/harbor-jobservice build/harbor-portal build/harbor-nginx build/harbor-redis build/harborregistry build/harborregistryctl build/harbor-trivy build/local-minio +local-harbor: build/harbor-core build/harbor-database build/harbor-jobservice build/harbor-portal build/harbor-nginx build/harbor-redis build/harborregistry build/harborregistryctl build/harbor-trivy IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d harbor-core harbor-database harbor-jobservice harbor-portal harbor-nginx harbor-redis harborregistry harborregistryctl harbor-trivy local-minio + +####### +####### Publishing Images +####### +####### baseimages are pushed to amazeeio repository for b/c + # Publish command to amazeeio docker hub, this should probably only be done during a master deployments publish-amazeeio-baseimages = $(foreach image,$(base-images),[publish-amazeeio-baseimages]-$(image)) -publish-amazeeio-baseimages-with-versions = $(foreach image,$(base-images-with-versions),[publish-amazeeio-baseimages-with-versions]-$(image)) # tag and push all images -.PHONY: publish-amazeeio-baseimages -publish-amazeeio-baseimages: $(publish-amazeeio-baseimages) $(publish-amazeeio-baseimages-with-versions) +.PHONY: publish-amazeeio-baseimages +publish-amazeeio-baseimages: $(publish-amazeeio-baseimages) # tag and push of each image .PHONY: $(publish-amazeeio-baseimages) $(publish-amazeeio-baseimages): # Calling docker_publish for image, but remove the prefix '[publish-amazeeio-baseimages]-' first $(eval image = $(subst [publish-amazeeio-baseimages]-,,$@)) -# Publish images as :latest - $(call docker_publish_amazeeio,$(image),$(image):latest) # Publish images with version tag $(call docker_publish_amazeeio,$(image),$(image):$(LAGOON_VERSION)) +# Publish command to amazeeio docker hub, this should probably only be done during a master deployments +publish-amazeeio-taskimages = $(foreach image,$(task-images),[publish-amazeeio-taskimages]-$(image)) +# tag and push all images +.PHONY: publish-amazeeio-taskimages +publish-amazeeio-taskimages: $(publish-amazeeio-taskimages) -# tag and push of base image with version -.PHONY: $(publish-amazeeio-baseimages-with-versions) -$(publish-amazeeio-baseimages-with-versions): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeio-baseimages-with-versions]-' first - $(eval image = $(subst [publish-amazeeio-baseimages-with-versions]-,,$@)) -# The underline is a placeholder for a colon, replace that - $(eval image = $(subst __,:,$(image))) -# These images already use a tag to differentiate between different versions of the service itself (like node:9 and node:10) -# We push a version without the `-latest` suffix - $(call docker_publish_amazeeio,$(image),$(image)) -# Plus a version with the `-latest` suffix, this makes it easier for people with automated testing - $(call docker_publish_amazeeio,$(image),$(image)-latest) -# We add the Lagoon Version just as a dash - $(call docker_publish_amazeeio,$(image),$(image)-$(LAGOON_VERSION)) - +# tag and push of each image +.PHONY: $(publish-amazeeio-taskimages) +$(publish-amazeeio-taskimages): +# Calling docker_publish for image, but remove the prefix '[publish-amazeeio-taskimages]-' first + $(eval image = $(subst [publish-amazeeio-taskimages]-,,$@)) +# Publish images with version tag + $(call docker_publish_amazeeio,$(image),$(image):$(LAGOON_VERSION)) +####### +####### All main&PR images are pushed to amazeeiolagoon repository -# Publish command to amazeeio docker hub, this should probably only be done during a master deployments +# Publish command to amazeeiolagoon docker hub, done on any main branch or PR publish-amazeeiolagoon-baseimages = $(foreach image,$(base-images),[publish-amazeeiolagoon-baseimages]-$(image)) -publish-amazeeiolagoon-baseimages-with-versions = $(foreach image,$(base-images-with-versions),[publish-amazeeiolagoon-baseimages-with-versions]-$(image)) # tag and push all images -.PHONY: publish-amazeeiolagoon-baseimages -publish-amazeeiolagoon-baseimages: $(publish-amazeeiolagoon-baseimages) $(publish-amazeeiolagoon-baseimages-with-versions) +.PHONY: publish-amazeeiolagoon-baseimages +publish-amazeeiolagoon-baseimages: $(publish-amazeeiolagoon-baseimages) # tag and push of each image .PHONY: $(publish-amazeeiolagoon-baseimages) @@ -826,24 +608,12 @@ $(publish-amazeeiolagoon-baseimages): $(call docker_publish_amazeeiolagoon,$(image),$(image):$(BRANCH_NAME)) -# tag and push of base image with version -.PHONY: $(publish-amazeeiolagoon-baseimages-with-versions) -$(publish-amazeeiolagoon-baseimages-with-versions): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeiolagoon-baseimages-with-versions]-' first - $(eval image = $(subst [publish-amazeeiolagoon-baseimages-with-versions]-,,$@)) -# The underline is a placeholder for a colon, replace that - $(eval image = $(subst __,:,$(image))) -# We add the Lagoon Version just as a dash - $(call docker_publish_amazeeiolagoon,$(image),$(image)-$(BRANCH_NAME)) - - # Publish command to amazeeio docker hub, this should probably only be done during a master deployments publish-amazeeiolagoon-serviceimages = $(foreach image,$(service-images),[publish-amazeeiolagoon-serviceimages]-$(image)) # tag and push all images .PHONY: publish-amazeeiolagoon-serviceimages publish-amazeeiolagoon-serviceimages: $(publish-amazeeiolagoon-serviceimages) - # tag and push of each image .PHONY: $(publish-amazeeiolagoon-serviceimages) $(publish-amazeeiolagoon-serviceimages): @@ -859,7 +629,6 @@ publish-amazeeiolagoon-taskimages = $(foreach image,$(task-images),[publish-amaz .PHONY: publish-amazeeiolagoon-taskimages publish-amazeeiolagoon-taskimages: $(publish-amazeeiolagoon-taskimages) - # tag and push of each image .PHONY: $(publish-amazeeiolagoon-taskimages) $(publish-amazeeiolagoon-taskimages): @@ -1186,7 +955,7 @@ k8s-dashboard: kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc2/aio/deploy/recommended.yaml; \ kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n kubernetes-dashboard rollout status deployment kubernetes-dashboard -w; \ echo -e "\nUse this token:"; \ - kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon describe secret $$(local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon get secret | grep kubernetesbuilddeploy | awk '{print $$1}') | grep token: | awk '{print $$2}'; \ + kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon describe secret $$(local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon get secret | grep kubernetes-build-deploy | awk '{print $$1}') | grep token: | awk '{print $$2}'; \ open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ ; \ kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' proxy @@ -1223,7 +992,7 @@ kubernetes-lagoon-setup: .PHONY: kubernetes-get-kubernetesbuilddeploy-token kubernetes-get-kubernetesbuilddeploy-token: - kubectl -n lagoon describe secret $$(kubectl -n lagoon get secret | grep kubernetesbuilddeploy | awk '{print $$1}') | grep token: | awk '{print $$2}' + kubectl -n lagoon describe secret $$(kubectl -n lagoon get secret | grep kubernetes-build-deploy | awk '{print $$1}') | grep token: | awk '{print $$2}' .PHONY: rebuild-push-oc-build-deploy-dind rebuild-push-oc-build-deploy-dind: diff --git a/images/athenapdf-service/Dockerfile b/images/athenapdf-service/Dockerfile index b67e1e1d11..8fa9ba4fb0 100644 --- a/images/athenapdf-service/Dockerfile +++ b/images/athenapdf-service/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM arachnysdocker/athenapdf-service:2.13.0 LABEL maintainer="amazee.io" diff --git a/images/commons/.bashrc b/images/commons/.bashrc deleted file mode 100644 index c5fb3f4205..0000000000 --- a/images/commons/.bashrc +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# Make sure that new files generated by Docker have group write permission -source /lagoon/entrypoints/00-umask.sh - -# Loading environment variables from .env and friends -source /lagoon/entrypoints/50-dotenv.sh - -# Generate some additional enviornment variables -source /lagoon/entrypoints/55-generate-env.sh - -# a nicer prompt -if [ "$PS1" ]; then - NORMAL="\[\e[0m\]" - RED="\[\e[1;31m\]" - GREEN="\[\e[0;32m\]" - YELLOW="\[\e[1;33m\]" - BLUE="\[\e[1;34m\]" - WHITE="\[\e[1;37m\]" - PS1="${YELLOW}\w${NORMAL}$ " - if [ "$LAGOON" ]; then - PS1="${GREEN}$LAGOON${NORMAL}:$PS1" - fi - if [ "$LAGOON_GIT_BRANCH" ]; then - # production environments get a red color - if [ "$LAGOON_ENVIRONMENT_TYPE" == "production" ]; then - PS1="${RED}$LAGOON_GIT_BRANCH${NORMAL}@$PS1" - else - PS1="${BLUE}$LAGOON_GIT_BRANCH${NORMAL}@$PS1" - fi - fi - if [ "$LAGOON_PROJECT" ]; then - PS1="[${WHITE}$LAGOON_PROJECT${NORMAL}]$PS1" - fi -fi - -# Helpers -alias ll="ls -l" diff --git a/images/commons/Dockerfile b/images/commons/Dockerfile deleted file mode 100644 index 153be44ea1..0000000000 --- a/images/commons/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -ARG ALPINE_VERSION -FROM alpine:${ALPINE_VERSION} - -LABEL maintainer="amazee.io" - -ENV LAGOON=commons - -COPY lagoon/ /lagoon/ -RUN mkdir -p /lagoon/bin -COPY fix-permissions docker-sleep entrypoint-readiness /bin/ -COPY .bashrc /home/.bashrc - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache curl tini \ - && rm -rf /var/cache/apk/* \ - && curl -sLo /bin/ep https://github.com/kreuzwerker/envplate/releases/download/1.0.0-RC1/ep-linux \ - && echo "48e234e067874a57a4d4bb198b5558d483ee37bcc285287fffb3864818b42f2785be0568faacbc054e97ca1c5047ec70382e1ca0e71182c9dba06649ad83a5f6 /bin/ep" | sha512sum -c \ - && chmod +x /bin/ep \ - && curl -sLo /lagoon/bin/cron https://github.com/christophlehmann/go-crond/releases/download/0.6.1-2-g7022a21/go-crond-64-linux \ - && echo "4ecbf269a00416086a855b760b6a691d1b8a6385adb18debec893bdbebccd20822b945c476406e3ca27c784812027c23745048fadc36c4067f12038aff972dce /lagoon/bin/cron" | sha512sum -c \ - && chmod +x /lagoon/bin/cron \ - && mkdir -p /lagoon/crontabs && fix-permissions /lagoon/crontabs \ - && ln -s /home/.bashrc /home/.profile - -RUN chmod g+w /etc/passwd - -ARG LAGOON_VERSION -RUN echo $LAGOON_VERSION > /lagoon/version -ENV LAGOON_VERSION=$LAGOON_VERSION - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/bin/docker-sleep"] diff --git a/images/commons/docker-sleep b/images/commons/docker-sleep deleted file mode 100755 index 426fb9e2a7..0000000000 --- a/images/commons/docker-sleep +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -while sleep 3600; do :; done \ No newline at end of file diff --git a/images/commons/entrypoint-readiness b/images/commons/entrypoint-readiness deleted file mode 100755 index 64f88f0100..0000000000 --- a/images/commons/entrypoint-readiness +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# simple readiness check to see if a late-running entrypoint has completed -# but only if the entrypoint actually exists -if [ -f /lagoon/entrypoints/999-readiness.sh ]; then - test -f /tmp/ready -fi diff --git a/images/commons/fix-permissions b/images/commons/fix-permissions deleted file mode 100755 index 8259c29048..0000000000 --- a/images/commons/fix-permissions +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Fix permissions on the given directory to allow group read/write of -# regular files and execute of directories. -find -L "$1" -exec chgrp 0 {} \; -find -L "$1" -exec chmod g+rw {} \; -find -L "$1" -type d -exec chmod g+x {} + diff --git a/images/commons/lagoon/cronjob.sh b/images/commons/lagoon/cronjob.sh deleted file mode 100755 index a558cfc7df..0000000000 --- a/images/commons/lagoon/cronjob.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -exit_trap() { - rv=$? - # TODO: Send Lagoon API information about our CronJob Success or Failure - exit $rv -} - -# on exit, always call exit_trap -trap exit_trap EXIT - -echo "$(date --utc +%FT%TZ) CRONJOB: $@" - -sh -c "/lagoon/entrypoints.sh $@" \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints.bash b/images/commons/lagoon/entrypoints.bash deleted file mode 100755 index 8c07b21421..0000000000 --- a/images/commons/lagoon/entrypoints.bash +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# This script will be the default ENTRYPOINT for all children docker images. -# It just sources all files within /lagoon/entrypoints/* in an alphabetical order and then runs `exec` on the given parameter. - -if [ -d /lagoon/entrypoints ]; then - for i in /lagoon/entrypoints/*; do - if [ -r $i ]; then - . $i - fi - done - unset i -fi - -exec "$@" \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints.sh b/images/commons/lagoon/entrypoints.sh deleted file mode 100755 index 55cedfac83..0000000000 --- a/images/commons/lagoon/entrypoints.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# This script will be the default ENTRYPOINT for all children docker images. -# It just sources all files within /lagoon/entrypoints/* in an alphabetical order and then runs `exec` on the given parameter. - -if [ -d /lagoon/entrypoints ]; then - for i in /lagoon/entrypoints/*; do - if [ -r $i ]; then - . $i - fi - done - unset i -fi - -exec "$@" \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/00-umask.sh b/images/commons/lagoon/entrypoints/00-umask.sh deleted file mode 100755 index 1f70ab745d..0000000000 --- a/images/commons/lagoon/entrypoints/00-umask.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Make sure that new files generated by Docker have group write permission -umask 002 \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/10-passwd.sh b/images/commons/lagoon/entrypoints/10-passwd.sh deleted file mode 100644 index 09aff906c2..0000000000 --- a/images/commons/lagoon/entrypoints/10-passwd.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if [ -w /etc/passwd ]; then - # Change root's home folder to /home - # (we can't use `sed -i` as we sed would create the tempfile in /etc) - TMPFILE=$(mktemp -p /tmp passwd.XXXXXX) - sed 's/root:\/root:/root:\/home:/' /etc/passwd > "$TMPFILE" - cat "$TMPFILE" > /etc/passwd - rm "$TMPFILE" - - # If we don't know who we are (whoami returns false) add a new entry into the users list - if ! whoami &> /dev/null; then - echo "${USER_NAME:-user}:x:$(id -u):0:${USER_NAME:-user}:${HOME}:/bin/sh" >> /etc/passwd - fi -fi diff --git a/images/commons/lagoon/entrypoints/50-dotenv.sh b/images/commons/lagoon/entrypoints/50-dotenv.sh deleted file mode 100644 index a588ce1360..0000000000 --- a/images/commons/lagoon/entrypoints/50-dotenv.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# dotenv implementation in Bash: -# We basically search for files within the current working directory (defined by WORKDIR in the Dockerfile). -# If it exists, we source them, which means their variables will exist as environment variables for all next processes -# The files are expected to be in this format: -# -# var1=value -# VAR2=value -# -# As there can already be env variables defined in either the Dockerfile of during runtime (via docker run), we have an hierarchy of Environment variables: -# (env variables defined in lower numbers are stronger) -# 1. Runtime env variables (docker run) -# 2. Env variables defined in Dockerfile (ENV) -# 3. Env variables defined in `.lagoon.env.$BRANCHNAME` (if file exists and where $BRANCHNAME is the Branch this Dockerimage has been built for), -# use this for overwriting variables for only specific branches -# 4. Env variables defined in `.env` -# 5. Env variables defined in `.env.defaults` - -# first export all current environment variables into a file. -# We do that in order to keep the hierarchy of environment variables. Already defined ones are probably overwritten -# via an `docker run -e VAR=VAL` system and they should still be used even they are defined in dotenv files. -TMPFILE=$(mktemp -t dotenv.XXXXXXXX) -export -p > $TMPFILE - -# set -a is short for `set -o allexport` which will export all variables in a file -set -a -[ -f .env.defaults ] && . ./.env.defaults || true -[ -f .env ] && . ./.env || true -# Provide a file that adds variables to all Lagoon envs, but is overridable in a specific env below -[ -f .lagoon.env ] && . ./.lagoon.env || true -[ -f .lagoon.env.$LAGOON_GIT_BRANCH ] && . ./.lagoon.env.$LAGOON_GIT_BRANCH || true -# Branch names can have weird special chars in them which are not allowed in File names, so we also try the Branch name with special chars replaced by dashes. -[ -f .lagoon.env.$LAGOON_GIT_SAFE_BRANCH ] && . ./.lagoon.env.$LAGOON_GIT_SAFE_BRANCH || true -set +a - -# now export all previously existing environments variables so they are stronger than maybe existing ones in the dotenv files -. $TMPFILE || true - -# remove the tmpfile -rm $TMPFILE diff --git a/images/commons/lagoon/entrypoints/55-generate-env.sh b/images/commons/lagoon/entrypoints/55-generate-env.sh deleted file mode 100644 index dc9aaa7783..0000000000 --- a/images/commons/lagoon/entrypoints/55-generate-env.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Create a LAGOON_DOMAIN from LAGOON_ROUTE but without the scheme (http:// or https://) -export LAGOON_DOMAIN=${LAGOON_ROUTE#*://} \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/90-cronjobs.sh b/images/commons/lagoon/entrypoints/90-cronjobs.sh deleted file mode 100644 index c53b6a7d9a..0000000000 --- a/images/commons/lagoon/entrypoints/90-cronjobs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Only if $CRONJOBS is not empty and /lagoon/crontabs/crontab is not existing yet -if [ -x /lagoon/bin/cron ] && [ ! -z "$CRONJOBS" ] && [ ! -f /lagoon/crontabs/crontab ]; then - echo "Setting up Cronjobs:" - echo "${CRONJOBS}" - echo "${CRONJOBS}" > /lagoon/crontabs/crontab - # go-crond does not like if group and others have write access to the crontab - chmod go-w /lagoon/crontabs/crontab - /lagoon/bin/cron $(whoami):/lagoon/crontabs/crontab --allow-unprivileged --no-auto -v & -fi \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/999-readiness.sh b/images/commons/lagoon/entrypoints/999-readiness.sh deleted file mode 100644 index 701997993e..0000000000 --- a/images/commons/lagoon/entrypoints/999-readiness.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -touch /tmp/ready diff --git a/images/curator/Dockerfile b/images/curator/Dockerfile index a7e771630b..cb5e20721c 100644 --- a/images/curator/Dockerfile +++ b/images/curator/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM bobrik/curator:5.7.6 USER root diff --git a/images/docker-host/Dockerfile b/images/docker-host/Dockerfile index 5587f2bf4b..e41dd00b93 100644 --- a/images/docker-host/Dockerfile +++ b/images/docker-host/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM docker:19.03.10-dind LABEL maintainer="amazee.io" diff --git a/images/elasticsearch/Dockerfile6 b/images/elasticsearch/Dockerfile6 deleted file mode 100644 index 4ecb16fede..0000000000 --- a/images/elasticsearch/Dockerfile6 +++ /dev/null @@ -1,57 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Defining Versions - https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docker.html -FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.2 - -LABEL maintainer="amazee.io" -ENV LAGOON=elasticsearch - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -COPY docker-entrypoint.sh.6 /lagoon/entrypoints/90-elasticsearch.sh - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN sed -i 's/discovery.zen.minimum_master_nodes: 1//' config/elasticsearch.yml - -RUN echo $'xpack.security.enabled: false\n\ -\n\ -node.name: "${HOSTNAME}"\n\ -node.master: "${NODE_MASTER}"\n\ -cluster.routing.allocation.disk.threshold_enabled: "true"\n\ -discovery.zen.minimum_master_nodes: "${DISCOVERY_ZEN_MINIMUM_MASTER_NODES}"' >> config/elasticsearch.yml - -RUN fix-permissions config - -ENV ES_JAVA_OPTS="-Xms200m -Xmx200m" \ - DISCOVERY_ZEN_MINIMUM_MASTER_NODES=1 \ - NODE_MASTER=true - -# Copy es-curl wrapper -COPY es-curl /usr/share/elasticsearch/bin/es-curl - -VOLUME [ "/usr/share/elasticsearch/data" ] - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] - -CMD ["/usr/local/bin/docker-entrypoint.sh"] diff --git a/images/elasticsearch/Dockerfile7 b/images/elasticsearch/Dockerfile7 deleted file mode 100644 index 4013e5dbde..0000000000 --- a/images/elasticsearch/Dockerfile7 +++ /dev/null @@ -1,70 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Defining Versions - https://www.elastic.co/guide/en/elasticsearch/reference/7.6/docker.html -FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.1 - -LABEL maintainer="amazee.io" -ENV LAGOON=elasticsearch - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -COPY docker-entrypoint.sh.7 /lagoon/entrypoints/90-elasticsearch.sh - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN echo $'\n\ -node.name: "${HOSTNAME}"\n\ -node.master: "${NODE_MASTER}"\n\ -node.data: "${NODE_DATA}"\n\ -node.ingest: "${NODE_INGEST}"\n\ -node.ml: "${NODE_ML}"\n\ -xpack.ml.enabled: "${XPACK_ML_ENABLED}"\n\ -xpack.watcher.enabled: "${XPACK_WATCHER_ENABLED}"\n\ -xpack.security.enabled: "${XPACK_SECURITY_ENABLED}"\n\ -processors: "${PROCESSORS}"\n\ -cluster.routing.allocation.disk.threshold_enabled: "true"\n\ -cluster.remote.connect: "${CLUSTER_REMOTE_CONNECT}"' >> config/elasticsearch.yml - -RUN fix-permissions config - -ENV ES_JAVA_OPTS="-Xms400m -Xmx400m" \ - NODE_MASTER=true \ - NODE_DATA=true \ - NODE_INGEST=true \ - NODE_ML=true \ - XPACK_ML_ENABLED=true \ - XPACK_WATCHER_ENABLED=true \ - XPACK_SECURITY_ENABLED=false \ - PROCESSORS=2 \ - CLUSTER_REMOTE_CONNECT=true \ - EXTRA_OPTS="" - -# Copy es-curl wrapper -COPY es-curl /usr/share/elasticsearch/bin/es-curl - - -VOLUME [ "/usr/share/elasticsearch/data" ] - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] - -CMD ["/usr/local/bin/docker-entrypoint.sh"] diff --git a/images/elasticsearch/docker-entrypoint.sh.6 b/images/elasticsearch/docker-entrypoint.sh.6 deleted file mode 100755 index 06acef3331..0000000000 --- a/images/elasticsearch/docker-entrypoint.sh.6 +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -ep /usr/share/elasticsearch/config/elasticsearch.yml - -if [ ! -z "$EXTRA_OPTS" ]; then - echo -e "${EXTRA_OPTS}" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi - -if [ -z "$POD_NAMESPACE" ]; then - # Single container runs in docker - echo "POD_NAMESPACE not set, spin up single node" -else - # Is running in Kubernetes/OpenShift, so find all other pods - # belonging to the namespace - echo "Elasticsearch: Running in Kubernetes, setting up for clustering" - K8S_SVC_NAME=$(hostname -f | cut -d"." -f2) - echo "Using service name: ${K8S_SVC_NAME}" - echo "discovery.zen.ping.unicast.hosts: ${K8S_SVC_NAME}" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi diff --git a/images/elasticsearch/docker-entrypoint.sh.7 b/images/elasticsearch/docker-entrypoint.sh.7 deleted file mode 100755 index 92391dd7df..0000000000 --- a/images/elasticsearch/docker-entrypoint.sh.7 +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -ep /usr/share/elasticsearch/config/elasticsearch.yml - -if [ ! -z "$EXTRA_OPTS" ]; then - echo -e "${EXTRA_OPTS}" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi - -if [ -z "$POD_NAMESPACE" ]; then - # Single container runs in docker - echo "POD_NAMESPACE not set, spin up single node" - sed -i 's/cluster.initial_master_nodes:.*//' /usr/share/elasticsearch/config/elasticsearch.yml - echo "cluster.initial_master_nodes: ${HOSTNAME}" >> /usr/share/elasticsearch/config/elasticsearch.yml -else - # Is running in Kubernetes/OpenShift, so find all other pods - # belonging to the namespace - echo "Elasticsearch: Running in Kubernetes, setting up for clustering" - K8S_SVC_NAME=$(hostname -f | cut -d"." -f2) - echo "Using service name: ${K8S_SVC_NAME}" - sed -i 's/discovery.seed_hosts:.*//' /usr/share/elasticsearch/config/elasticsearch.yml - sed -i 's/cluster.initial_master_nodes:.*//' /usr/share/elasticsearch/config/elasticsearch.yml - echo "discovery.seed_hosts: ${K8S_SVC_NAME}" >> /usr/share/elasticsearch/config/elasticsearch.yml - echo "cluster.initial_master_nodes: ${K8S_SVC_NAME}-0" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi diff --git a/images/elasticsearch/es-curl b/images/elasticsearch/es-curl deleted file mode 100755 index 168b531372..0000000000 --- a/images/elasticsearch/es-curl +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ] || [ -z "$2" ]; then - echo "Usage: es-curl.sh VERB COMMAND" - exit 1 -fi - -VERB=$1 -COMMAND=$2 - -shift -shift - -if [ "$LOGSDB_ADMIN_PASSWORD" ]; then - curl -X $VERB -k -u "admin:$LOGSDB_ADMIN_PASSWORD" "http://localhost:9200/$COMMAND" -H 'Content-Type: application/json' "$@" -else - curl -X $VERB -k "http://localhost:9200/$COMMAND" -H 'Content-Type: application/json' "$@" -fi diff --git a/images/kibana/Dockerfile6 b/images/kibana/Dockerfile6 deleted file mode 100644 index f7f2c63c23..0000000000 --- a/images/kibana/Dockerfile6 +++ /dev/null @@ -1,42 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/kibana/kibana:6.8.2 - -LABEL maintainer="amazee.io" -ENV LAGOON=kibana - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/kibana - -# tells the local development environment on which port we are running -# ENV LAGOON_LOCALDEV_HTTP_PORT=5601 - -ENV NODE_OPTIONS="--max-old-space-size=200" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["/bin/bash", "/usr/local/bin/kibana-docker"] diff --git a/images/kibana/Dockerfile7 b/images/kibana/Dockerfile7 deleted file mode 100644 index 983ca496c2..0000000000 --- a/images/kibana/Dockerfile7 +++ /dev/null @@ -1,42 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/kibana/kibana:7.6.1 - -LABEL maintainer="amazee.io" -ENV LAGOON=kibana - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/kibana - -# tells the local development environment on which port we are running -# ENV LAGOON_LOCALDEV_HTTP_PORT=5601 - -ENV NODE_OPTIONS="--max-old-space-size=200" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["/bin/bash", "/usr/local/bin/kibana-docker"] diff --git a/images/kubectl/Dockerfile b/images/kubectl/Dockerfile index 99bc279f48..fe656a1d07 100644 --- a/images/kubectl/Dockerfile +++ b/images/kubectl/Dockerfile @@ -1,6 +1,7 @@ ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM golang:1.13-alpine${ALPINE_VERSION} as golang RUN apk add --no-cache git diff --git a/images/logstash/Dockerfile6 b/images/logstash/Dockerfile6 deleted file mode 100644 index 7963ee0d63..0000000000 --- a/images/logstash/Dockerfile6 +++ /dev/null @@ -1,41 +0,0 @@ - - -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/logstash/logstash:6.8.2 - -LABEL maintainer="amazee.io" -ENV LAGOON=logstash - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/logstash/data \ - && fix-permissions /usr/share/logstash/config - -ENV LS_JAVA_OPTS "-Xms400m -Xmx400m" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash", "/usr/local/bin/docker-entrypoint"] \ No newline at end of file diff --git a/images/logstash/Dockerfile7 b/images/logstash/Dockerfile7 deleted file mode 100644 index b2c6c6d4ec..0000000000 --- a/images/logstash/Dockerfile7 +++ /dev/null @@ -1,39 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/logstash/logstash:7.3.0 - -LABEL maintainer="amazee.io" -ENV LAGOON=logstash - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/logstash/data \ - && fix-permissions /usr/share/logstash/config - -ENV LS_JAVA_OPTS "-Xms400m -Xmx400m" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash", "/usr/local/bin/docker-entrypoint"] \ No newline at end of file diff --git a/images/mariadb-drupal/Dockerfile b/images/mariadb-drupal/Dockerfile deleted file mode 100644 index cdce5d1b35..0000000000 --- a/images/mariadb-drupal/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/mariadb - -ENV MARIADB_DATABASE=drupal \ - MARIADB_USER=drupal \ - MARIADB_PASSWORD=drupal diff --git a/images/mariadb/Dockerfile b/images/mariadb/Dockerfile deleted file mode 100644 index bb400b8b70..0000000000 --- a/images/mariadb/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM alpine:${ALPINE_VERSION} - -LABEL maintainer="amazee.io" - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -ENV BACKUPS_DIR="/var/lib/mysql/backup" - -ENV MARIADB_DATABASE=lagoon \ - MARIADB_USER=lagoon \ - MARIADB_PASSWORD=lagoon \ - MARIADB_ROOT_PASSWORD=Lag00n - -RUN \ - apk add --no-cache --virtual .common-run-deps \ - bash \ - curl \ - mariadb \ - mariadb-client \ - mariadb-common \ - mariadb-server-utils \ - net-tools \ - pwgen \ - tzdata \ - wget \ - gettext; \ - rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*; \ - rm -rf /var/lib/mysql/* /etc/mysql/ /etc/my.cnf*; \ - curl -sSL http://mysqltuner.pl/ -o mysqltuner.pl - -COPY entrypoints/ /lagoon/entrypoints/ -COPY mysql-backup.sh /lagoon/ -COPY my.cnf /etc/mysql/my.cnf - -RUN for i in /var/run/mysqld /var/lib/mysql /etc/mysql/conf.d /docker-entrypoint-initdb.d/ "${BACKUPS_DIR}" /home; \ - do mkdir -p $i; chown mysql $i; /bin/fix-permissions $i; \ - done - -COPY root/usr/share/container-scripts/mysql/readiness-probe.sh /usr/share/container-scripts/mysql/readiness-probe.sh -RUN /bin/fix-permissions /usr/share/container-scripts/mysql/ \ - && /bin/fix-permissions /etc/mysql - -RUN touch /var/log/mariadb-slow.log && /bin/fix-permissions /var/log/mariadb-slow.log \ - && touch /var/log/mariadb-queries.log && /bin/fix-permissions /var/log/mariadb-queries.log - -# We cannot start mysql as root, we add the user mysql to the group root and -# change the user of the Docker Image to this user. -RUN addgroup mysql root -USER mysql -ENV USER_NAME mysql - -WORKDIR /var/lib/mysql -VOLUME /var/lib/mysql -EXPOSE 3306 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["mysqld"] diff --git a/images/mariadb/entrypoints/100-mariadb-logging.bash b/images/mariadb/entrypoints/100-mariadb-logging.bash deleted file mode 100755 index 976d9218a0..0000000000 --- a/images/mariadb/entrypoints/100-mariadb-logging.bash +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -if [ -n "$MARIADB_LOG_SLOW" ]; then - echo "MARIADB_LOG_SLOW set, logging to /etc/mysql/conf.d/log-slow.cnf" - cat < /etc/mysql/conf.d/log-slow.cnf -[mysqld] -slow_query_log = 1 -slow_query_log_file = /var/log/mariadb-slow.log -EOF -fi - - -if [ -n "$MARIADB_LOG_QUERIES" ]; then - echo "MARIADB_LOG_QUERIES set, logging to /etc/mysql/conf.d/log-queries.cnf" - cat < /etc/mysql/conf.d/log-queries.cnf - -[mysqld] -general-log -log-output=file -general-log-file=/var/log/mariadb-queries.log -EOF -fi diff --git a/images/mariadb/entrypoints/150-mariadb-performance.bash b/images/mariadb/entrypoints/150-mariadb-performance.bash deleted file mode 100755 index c8b73b2d45..0000000000 --- a/images/mariadb/entrypoints/150-mariadb-performance.bash +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -if [ "$LAGOON_ENVIRONMENT_TYPE" == "production" ]; then - # only set if not already defined - if [ -z ${MARIADB_INNODB_BUFFER_POOL_SIZE+x} ]; then - export MARIADB_INNODB_BUFFER_POOL_SIZE=1024M - fi - if [ -z ${MARIADB_INNODB_LOG_FILE_SIZE+x} ]; then - export MARIADB_INNODB_LOG_FILE_SIZE=256M - fi -fi \ No newline at end of file diff --git a/images/mariadb/entrypoints/200-mariadb-envplate.bash b/images/mariadb/entrypoints/200-mariadb-envplate.bash deleted file mode 100755 index b5a659cc07..0000000000 --- a/images/mariadb/entrypoints/200-mariadb-envplate.bash +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -/bin/ep /etc/mysql/* \ No newline at end of file diff --git a/images/mariadb/entrypoints/9999-mariadb-init.bash b/images/mariadb/entrypoints/9999-mariadb-init.bash deleted file mode 100755 index 72dc40ad22..0000000000 --- a/images/mariadb/entrypoints/9999-mariadb-init.bash +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -# Locations -CONTAINER_SCRIPTS_DIR="/usr/share/container-scripts/mysql" - -if [ "$(ls -A /etc/mysql/conf.d/)" ]; then - ep /etc/mysql/conf.d/* -fi - -if [ "${1:0:1}" = '-' ]; then - set -- mysqld "$@" -fi - -wantHelp= -for arg; do - case "$arg" in - -'?'|--help|--print-defaults|-V|--version) - wantHelp=1 - break - ;; - esac -done - -# check if MARIADB_COPY_DATA_DIR_SOURCE is set, if yes we're coping the contents of the given folder into the data dir folder -# this allows to prefill the datadir with a provided datadir (either added in a Dockerfile build, or mounted into the running container). -# This is different than just setting $MARIADB_DATA_DIR to the source folder, as only /var/lib/mysql is a persistent folder, so setting -# $MARIADB_DATA_DIR to another folder will make mariadb to not store the datadir across container restarts, while with this copy system -# the data will be prefilled and persistent across container restarts. -if [ -n "$MARIADB_COPY_DATA_DIR_SOURCE" ]; then - if [ -d ${MARIADB_DATA_DIR:-/var/lib/mysql}/mysql ]; then - echo "MARIADB_COPY_DATA_DIR_SOURCE is set, but MySQL directory already present in '${MARIADB_DATA_DIR:-/var/lib/mysql}/mysql' skipping copying" - else - echo "MARIADB_COPY_DATA_DIR_SOURCE is set, copying datadir contents from '$MARIADB_COPY_DATA_DIR_SOURCE' to '${MARIADB_DATA_DIR:-/var/lib/mysql}'" - CUR_DIR=${PWD} - cd ${MARIADB_COPY_DATA_DIR_SOURCE}/; tar cf - . | (cd ${MARIADB_DATA_DIR:-/var/lib/mysql}; tar xvf -) - cd $CUR_DIR - fi -fi - -ln -sf ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf /home/.my.cnf - -if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then - if [ ! -d "/run/mysqld" ]; then - mkdir -p /run/mysqld - chown -R mysql:mysql /run/mysqld - fi - - if [ -d ${MARIADB_DATA_DIR:-/var/lib/mysql}/mysql ]; then - echo "MySQL directory already present, skipping creation" - - echo "starting mysql for mysql upgrade." - /usr/bin/mysqld --skip-networking --wsrep_on=OFF & - pid="$!" - echo "pid is $pid" - - for i in {30..0}; do - if echo 'SELECT 1' | mysql -u root; then - break - fi - echo 'MySQL init process in progress...' - sleep 1 - done - - mysql_upgrade --force - - if ! kill -s TERM "$pid" || ! wait "$pid"; then - echo >&2 'MySQL init process failed.' - exit 1 - fi - else - echo "MySQL data directory not found, creating initial DBs" - - mysql_install_db --skip-name-resolve --skip-test-db --auth-root-authentication-method=normal --datadir=${MARIADB_DATA_DIR:-/var/lib/mysql} --basedir=/usr - - echo "starting mysql for initdb.d import." - /usr/bin/mysqld --skip-networking --wsrep_on=OFF & - pid="$!" - echo "pid is $pid" - - for i in {30..0}; do - if echo 'SELECT 1' | mysql -u root; then - break - fi - echo 'MySQL init process in progress...' - sleep 1 - done - - if [ "$MARIADB_ROOT_PASSWORD" = "" ]; then - MARIADB_ROOT_PASSWORD=`pwgen 16 1` - echo "[i] MySQL root Password: $MARIADB_ROOT_PASSWORD" - fi - - MARIADB_DATABASE=${MARIADB_DATABASE:-""} - MARIADB_USER=${MARIADB_USER:-""} - MARIADB_PASSWORD=${MARIADB_PASSWORD:-""} - - tfile=`mktemp` - if [ ! -f "$tfile" ]; then - return 1 - fi - - cat << EOF > $tfile -DROP DATABASE IF EXISTS test; -USE mysql; -ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD("$MARIADB_ROOT_PASSWORD"); -FLUSH PRIVILEGES; - -EOF - - if [ "$MARIADB_DATABASE" != "" ]; then - echo "[i] Creating database: $MARIADB_DATABASE" - echo "CREATE DATABASE IF NOT EXISTS \`$MARIADB_DATABASE\` ;" >> $tfile - if [ "$MARIADB_USER" != "" ]; then - echo "[i] Creating user: $MARIADB_USER with password $MARIADB_PASSWORD" - echo "GRANT ALL ON \`$MARIADB_DATABASE\`.* to '$MARIADB_USER'@'%' IDENTIFIED BY '$MARIADB_PASSWORD';" >> $tfile - fi - fi - - - cat $tfile - cat $tfile | mysql -v -u root - rm -v -f $tfile - - echo "[client]" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "user=root" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "password=${MARIADB_ROOT_PASSWORD}" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "[mysql]" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "database=${MARIADB_DATABASE}" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - - for f in `ls /docker-entrypoint-initdb.d/*`; do - case "$f" in - *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; cat $f| envsubst | tee | mysql -u root -p${MARIADB_ROOT_PASSWORD}; echo ;; - *) echo "$0: ignoring $f" ;; - esac - echo - done - - if ! kill -s TERM "$pid" || ! wait "$pid"; then - echo >&2 'MySQL init process failed.' - exit 1 - fi - - fi - - echo "done, now starting daemon" - -fi diff --git a/images/mariadb/my.cnf b/images/mariadb/my.cnf deleted file mode 100644 index 2a727bb2d0..0000000000 --- a/images/mariadb/my.cnf +++ /dev/null @@ -1,42 +0,0 @@ -# The following options will be passed to all MariaDB clients -[client] -port = 3306 -socket = /run/mysqld/mysqld.sock - -# Here follows entries for some specific programs - -# The MariaDB server -[mysqld] -port = 3306 -socket = /run/mysqld/mysqld.sock -datadir = ${MARIADB_DATA_DIR:-/var/lib/mysql} -character_set_server = ${MARIADB_CHARSET:-utf8mb4} -collation_server = ${MARIADB_COLLATION:-utf8mb4_bin} -expire_logs_days = 10 -ignore_db_dirs=backup -innodb_buffer_pool_size = ${MARIADB_INNODB_BUFFER_POOL_SIZE:-256M} -innodb_buffer_pool_instances = ${MARIADB_INNODB_BUFFER_POOL_INSTANCES:-1} -innodb_log_buffer_size = 32M -innodb_log_file_size = ${MARIADB_INNODB_LOG_FILE_SIZE:-64M} -join_buffer_size = 2M -key_buffer_size = 16M -max_allowed_packet = ${MARIADB_MAX_ALLOWED_PACKET:-64M} -max_binlog_size = 100M -max_connections = 400 -max_heap_table_size = 512M -myisam-recover-options = BACKUP -query_cache_size = 0 -query_cache_type = 0 -skip-external-locking -skip_name_resolve = 1 -table_open_cache = 200000 -thread_cache_size = 8 -thread_stack = 256K -tmp_table_size = 512M -tmpdir = /tmp -transaction-isolation = READ-COMMITTED -skip-name-resolve -optimizer_search_depth = 0 -innodb_flush_log_at_trx_commit = 0 - -!includedir /etc/mysql/conf.d diff --git a/images/mariadb/mysql-backup.sh b/images/mariadb/mysql-backup.sh deleted file mode 100755 index bea76622ef..0000000000 --- a/images/mariadb/mysql-backup.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -#============================================================================== -#TITLE: mysql_backup.sh -#DESCRIPTION: script for automating the daily mysql backups on development computer -#AUTHOR: tleish -#DATE: 2013-12-20 -#VERSION: 0.4 -#USAGE: ./mysql_backup.sh -#CRON: - # example cron for daily db backup @ 9:15 am - # min hr mday month wday command - # 15 9 * * * /Users/[your user name]/scripts/mysql_backup.sh - -#RESTORE FROM BACKUP - #$ gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname] - -#============================================================================== -# CUSTOM SETTINGS -#============================================================================== - -set -eu -o pipefail - -# directory to put the backup files -BACKUP_DIR=${MARIADB_DATA_DIR:-/var/lib/mysql}/backup - -# MYSQL Parameters -MARIADB_USER=${MARIADB_USER:-lagoon} -MARIADB_PASSWORD=${MARIADB_PASSWORD:-lagoon} - -MARIADB_HOST=$1 - -# Don't backup databases with these names -# Example: starts with mysql (^mysql) or ends with _schema (_schema$) -IGNORE_DB="(^mysql|_schema$)" - -# Number of days to keep backups -KEEP_BACKUPS_FOR=4 #days - -#============================================================================== -# METHODS -#============================================================================== - -# YYYY-MM-DD_HHMMSS -TIMESTAMP=$(date +%F_%H%M%S) - -function prepare() -{ - mkdir -p $BACKUP_DIR -} - -function delete_old_backups() -{ - echo "Deleting $BACKUP_DIR/*.sql.gz older than $KEEP_BACKUPS_FOR days" - find $BACKUP_DIR -type f -name "*.sql.gz" -mtime +$KEEP_BACKUPS_FOR -exec rm {} \; -} - -function mysql_login() { - cmd="-u $MARIADB_USER -h $MARIADB_HOST" - if [ -n "$MARIADB_PASSWORD" ]; then - cmd="$cmd -p$MARIADB_PASSWORD" - fi - echo $cmd -} - -function database_list() { - local show_databases_sql="SHOW DATABASES WHERE \`Database\` NOT REGEXP '$IGNORE_DB'" - echo $(mysql $(mysql_login) -e "$show_databases_sql"|awk -F " " '{if (NR!=1) print $1}') -} - -function echo_status(){ - printf '\r'; - printf ' %0.s' {0..100} - printf '\r'; - printf "$1"'\r' -} - -function backup_database(){ - backup_file="$BACKUP_DIR/$TIMESTAMP.$database.sql.gz" - output="${output}${database} => $backup_file\n" - echo_status "...backing up $count of $total databases: $database" - $(mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction $(mysql_login) $database | gzip -9 > $backup_file) -} - -function backup_databases(){ - local databases=$(database_list) - local total=$(echo $databases | wc -w | xargs) - local output="" - local count=1 - for database in $databases; do - backup_database - local count=$((count+1)) - done - echo -ne $output -} - -function hr(){ - printf '=%.0s' {1..100} - printf "\n" -} - -#============================================================================== -# RUN SCRIPT -#============================================================================== -prepare -delete_old_backups -hr -backup_databases -hr -printf "All backed up!\n\n" diff --git a/images/mariadb/root/usr/share/container-scripts/mysql/readiness-probe.sh b/images/mariadb/root/usr/share/container-scripts/mysql/readiness-probe.sh deleted file mode 100755 index 368be4374b..0000000000 --- a/images/mariadb/root/usr/share/container-scripts/mysql/readiness-probe.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# openshift-mariadb: mysqld readinessProbe -# - -mysql --defaults-file=${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf -e"SHOW DATABASES;" - -if [ $? -ne 0 ]; then - exit 1 -else - exit 0 -fi diff --git a/images/mongo/Dockerfile b/images/mongo/Dockerfile deleted file mode 100644 index 0c433eb0dc..0000000000 --- a/images/mongo/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM alpine:3.8 - -LABEL maintainer="amazee.io" -ENV LAGOON=mongo - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk --no-cache add mongodb - -RUN mkdir -p /data/db /data/configdb && \ - fix-permissions /data/db && \ - fix-permissions /data/configdb - -VOLUME /data/db -EXPOSE 27017 28017 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD [ "mongod", "--bind_ip", "0.0.0.0" ] diff --git a/images/nginx-drupal/Dockerfile b/images/nginx-drupal/Dockerfile deleted file mode 100644 index 20f043040c..0000000000 --- a/images/nginx-drupal/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/nginx - -LABEL maintainer="amazee.io" -ENV LAGOON=nginx - -RUN mkdir -p /etc/nginx/conf.d/drupal - -COPY drupal /etc/nginx/conf.d/drupal/ -COPY drupal.conf /etc/nginx/conf.d/app.conf - -RUN fix-permissions /etc/nginx diff --git a/images/nginx-drupal/drupal.conf b/images/nginx-drupal/drupal.conf deleted file mode 100644 index de97c2b71c..0000000000 --- a/images/nginx-drupal/drupal.conf +++ /dev/null @@ -1,145 +0,0 @@ -### Nginx configuration for Drupal 7 and 8. -server { - include /etc/nginx/conf.d/drupal/server_prepend*.conf; - - listen ${NGINX_LISTEN:-8080} default_server; - - include /etc/nginx/helpers/*.conf; - - root /app/${WEBROOT:-}; - index index.php; - - ## rewriting /index.php to / because after https://www.drupal.org/node/2599326 - ## autocomplete URLs are forced to go to index.php - rewrite ^/index.php / last; - - ## The 'default' location. - location / { - include /etc/nginx/conf.d/drupal/location_prepend*.conf; - - ## Do not allow access to .txt and .md unless inside sites/*/files/ - location ~* ^(?!.+sites\/.+\/files\/).+\.(txt|md)$ { - deny all; - access_log off; - log_not_found off; - } - - ## Replicate the Apache directive of Drupal standard - ## .htaccess. Disable access to any code files. Return a 404 to curtail - ## information disclosure. - location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^\/(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^\/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ { - deny all; - access_log off; - log_not_found off; - } - - ## Expiring per default for four weeks and one second, Drupal will overwrite that if necessary - expires ${NGINX_DEFAULT_EXPIRES:-2628001s}; - - ## Disallow access to any dot files, but send the request to Drupal - location ~* /\. { - try_files /dev/null @drupal; - } - - ### Directives for installing drupal. - location ~* ^(/install.php|/core/install.php) { - try_files /dev/null @php; - } - - ## Direct Access to .php files is not alled and is sent to Drupal instead - location ~* ^.+\.php$ { - try_files /dev/null @drupal; - } - - ## Try to find a file with given URL, if not pass to Drupal - try_files $uri @drupal; - - include /etc/nginx/conf.d/drupal/location_append*.conf; - } - - ## Main Drupal Location - location @drupal { - include /etc/nginx/conf.d/drupal/location_drupal_prepend*.conf; - - include /etc/nginx/fastcgi.conf; - fastcgi_param SCRIPT_NAME /index.php; - fastcgi_param SCRIPT_FILENAME $realpath_root/index.php; - fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; - - include /etc/nginx/conf.d/drupal/location_drupal_append*.conf; - } - - ## PHP Location. - ## Warning: This allows to execute any PHP files, use with care! - location @php { - include /etc/nginx/conf.d/drupal/location_php_prepend*.conf; - - include /etc/nginx/fastcgi.conf; - fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; - - include /etc/nginx/conf.d/drupal/location_php_append*.conf; - } - - ## Trying to access private files directly returns a 404. - location /sites/default/files/private/ { - internal; - } - - ## Disallow access to patches directory. - location ^~ /patches/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to backup directory. - location ^~ /backup/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to vagrant directory. - location ^~ /vagrant/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to vendor directory. - location ^~ /core/vendor/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to vendor directory. - location ^~ /vendor/ { - deny all; - access_log off; - log_not_found off; - } - - ## Support for the robotstxt module - ## http://drupal.org/project/robotstxt. - location = /robots.txt { - access_log off; - try_files $uri @drupal; - } - - ## Add support for the humanstxt module - ## http://drupal.org/project/humanstxt. - location = /humans.txt { - access_log off; - try_files $uri @drupal; - } - - ## Return an in memory 1x1 transparent GIF. - location @empty { - expires 30d; - empty_gif; - } - - include /etc/nginx/conf.d/drupal/favicon.conf; - include /etc/nginx/conf.d/drupal/server_append*.conf; -} diff --git a/images/nginx-drupal/drupal/favicon.conf b/images/nginx-drupal/drupal/favicon.conf deleted file mode 100644 index bbe0d8427b..0000000000 --- a/images/nginx-drupal/drupal/favicon.conf +++ /dev/null @@ -1,6 +0,0 @@ -## Support for favicon. Return an 1x1 transparent GIF if it doesn't -## exist. -location = /favicon.ico { - expires 30d; - try_files /favicon.ico @empty; -} diff --git a/images/nginx/Dockerfile b/images/nginx/Dockerfile deleted file mode 100644 index 5f9cc78ccc..0000000000 --- a/images/nginx/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Alpine 3.11 per https://github.com/openresty/docker-openresty/blob/master/alpine/Dockerfile#L5 -FROM openresty/openresty:1.17.8.2-alpine - -LABEL maintainer="amazee.io" -ENV LAGOON=nginx - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk add --no-cache openssl - -RUN rm -Rf /etc/nginx && ln -s /usr/local/openresty/nginx/conf /etc/nginx - -COPY nginx.conf /etc/nginx/nginx.conf -COPY fastcgi.conf /etc/nginx/fastcgi.conf -COPY fastcgi.conf /etc/nginx/fastcgi_params -COPY helpers/ /etc/nginx/helpers/ -COPY static-files.conf /etc/nginx/conf.d/app.conf -COPY redirects-map.conf /etc/nginx/redirects-map.conf -COPY healthcheck/healthz.locations healthcheck/healthz.locations.php.disable /etc/nginx/conf.d/ - -RUN mkdir -p /app \ - && rm -f /etc/nginx/conf.d/default.conf \ - && fix-permissions /usr/local/openresty/nginx \ - && fix-permissions /var/run/ - -COPY docker-entrypoint /lagoon/entrypoints/70-nginx-entrypoint - -WORKDIR /app - -EXPOSE 8080 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=8080 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["nginx", "-g", "daemon off;"] diff --git a/images/nginx/docker-entrypoint b/images/nginx/docker-entrypoint deleted file mode 100755 index 2f8458ec4a..0000000000 --- a/images/nginx/docker-entrypoint +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# If `BASIC_AUTH` is not already set to 'off'. -if [[ ! "${BASIC_AUTH}" == "off" ]]; then - # And if a username and password is set. - if [ ! -z ${BASIC_AUTH_USERNAME+x} ] && [ ! -z ${BASIC_AUTH_PASSWORD+x} ]; then - # Generate a basic authentication config file for Nginx. - printf "${BASIC_AUTH_USERNAME}:$(openssl passwd -crypt ${BASIC_AUTH_PASSWORD})\n" >> /etc/nginx/.htpasswd - # Set `BASIC_AUTH` to restricted which will tell nginx to do basic authentication. - export BASIC_AUTH="restricted" - fi -fi - -ep /etc/nginx/* -# Find all folders within /etc/nginx/conf.d/ -find /etc/nginx/conf.d/ -type d | while read DIR; do - # envplate if found folder is not empty - if find $DIR -mindepth 1 | read; then - ep $DIR/*; - fi -done -ep /etc/nginx/helpers/* - -# If PHP is enabled, we override the Luascript /healthz check -echo "Setting up Healthz routing" -if [ ! -z "$NGINX_FASTCGI_PASS" ]; then - echo "Healthz routing - using PHP" - cp /etc/nginx/conf.d/healthz.locations.php.disable /etc/nginx/conf.d/healthz.locations -fi - -if [ "$FAST_HEALTH_CHECK" == "true" ]; then - echo "FAST HEALTH CHECK ENABLED" - cp /etc/nginx/helpers/90_healthz_fast_check.conf.disabled /etc/nginx/helpers/90_health_fast_check.conf -fi \ No newline at end of file diff --git a/images/nginx/fastcgi.conf b/images/nginx/fastcgi.conf deleted file mode 100644 index 9cbc41e668..0000000000 --- a/images/nginx/fastcgi.conf +++ /dev/null @@ -1,63 +0,0 @@ - -set $fastcgi_port "80"; -if ($http_x_forwarded_proto = 'https') { - set $fastcgi_https "on"; - set $fastcgi_port "443"; -} - -set_by_lua_block $remote_addr_clean { - if string.find(ngx.var.remote_addr, "^::ffff:") then - return string.match(ngx.var.remote_addr, "^::ffff:(.*)") - else - return ngx.var.remote_addr - end -} - -fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; -fastcgi_param QUERY_STRING $query_string; -fastcgi_param REQUEST_METHOD $request_method; -fastcgi_param CONTENT_TYPE $content_type; -fastcgi_param CONTENT_LENGTH $content_length; - -fastcgi_param SCRIPT_NAME $fastcgi_script_name; -fastcgi_param REQUEST_URI $request_uri; -fastcgi_param DOCUMENT_URI $document_uri; -fastcgi_param DOCUMENT_ROOT $document_root; -fastcgi_param SERVER_PROTOCOL $server_protocol; -fastcgi_param REQUEST_SCHEME $scheme; -fastcgi_param HTTPS $https if_not_empty; -fastcgi_param HTTPS $fastcgi_https if_not_empty; - -fastcgi_param GATEWAY_INTERFACE CGI/1.1; -fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; - -fastcgi_param REMOTE_ADDR $remote_addr_clean; -fastcgi_param REMOTE_PORT $remote_port; -fastcgi_param SERVER_ADDR $server_addr; - -# Setting to Port 80 and 443 based on if we have an upstream https or not -fastcgi_param SERVER_PORT $fastcgi_port; - -# Setting to $host as $server_name is empty all the time -fastcgi_param SERVER_NAME $host; - -# PHP only, required if PHP was built with --enable-force-cgi-redirect -fastcgi_param REDIRECT_STATUS 200; - -# Mitigate https://httpoxy.org/ vulnerabilities -fastcgi_param HTTP_PROXY ""; - -# Mitigate CVE-2018-14773: https://symfony.com/blog/cve-2018-14773-remove-support-for-legacy-and-risky-http-headers -fastcgi_param HTTP_X-ORIGINAL-URL ""; -fastcgi_param HTTP_X_ORIGINAL_URL ""; -fastcgi_param HTTP_X-REWRITE-URL ""; -fastcgi_param HTTP_X_REWRITE_URL ""; - -fastcgi_keep_conn on; -fastcgi_index index.php; -fastcgi_hide_header 'X-Generator'; - -fastcgi_buffers ${FASTCGI_BUFFERS:-256 32k}; -fastcgi_buffer_size ${FASTCGI_BUFFER_SIZE:-32k}; -fastcgi_read_timeout ${FASTCGI_READ_TIMEOUT:-3600s}; -fastcgi_temp_path /tmp/fastcgi_temp; diff --git a/images/nginx/healthcheck/README.md b/images/nginx/healthcheck/README.md deleted file mode 100644 index 43751e2e11..0000000000 --- a/images/nginx/healthcheck/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Healthcheck - -In this directory you'll find two files - -- healthz.locations.php.disable -- healthz.locations - -Both are designed to expose a `/.lagoonhealthz` location from the nginx service. The difference being that the `.php.disable` file is used to point to the [healthz-php](https://github.com/amazeeio/healthz-php) application _if_ there is a PHP service attached to this application. - -The logic for which of the two files are enabled are contained in this image's `docker-entrypoint` file - there we check for the existence of the env var `NGINX_FASTCGI_PASS`, which indicates (or should indicate) the presence of a PHP-fpm service. \ No newline at end of file diff --git a/images/nginx/healthcheck/healthz.locations b/images/nginx/healthcheck/healthz.locations deleted file mode 100644 index 95cf2ed753..0000000000 --- a/images/nginx/healthcheck/healthz.locations +++ /dev/null @@ -1,8 +0,0 @@ -location /.lagoonhealthz { - content_by_lua_block { - ngx.status = ngx.HTTP_OK; - ngx.header.content_type = 'application/json'; - ngx.say('{"check_nginx":"pass"}'); - ngx.exit(ngx.OK); - } -} diff --git a/images/nginx/healthcheck/healthz.locations.php.disable b/images/nginx/healthcheck/healthz.locations.php.disable deleted file mode 100644 index dd6be8e7ea..0000000000 --- a/images/nginx/healthcheck/healthz.locations.php.disable +++ /dev/null @@ -1,10 +0,0 @@ -location /.lagoonhealthz { - rewrite ^/.lagoonhealthz(/.*)?$ /.lagoonhealthz/index.php; - - location ~* \.php(/|$) { - include /etc/nginx/fastcgi.conf; - fastcgi_param SCRIPT_NAME /index.php; - fastcgi_param SCRIPT_FILENAME /healthz-php/index.php; - fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; - } -} diff --git a/images/nginx/helpers/000_variables.conf b/images/nginx/helpers/000_variables.conf deleted file mode 100644 index a54bf1cdd4..0000000000 --- a/images/nginx/helpers/000_variables.conf +++ /dev/null @@ -1,2 +0,0 @@ -# sets the nginx internal variable $lagoon_environment_type to the env variable LAGOON_ENVIRONMENT_TYPE -set_by_lua_block $lagoon_environment_type { return os.getenv("LAGOON_ENVIRONMENT_TYPE") } \ No newline at end of file diff --git a/images/nginx/helpers/010_redirects.conf b/images/nginx/helpers/010_redirects.conf deleted file mode 100644 index 0431d1bba1..0000000000 --- a/images/nginx/helpers/010_redirects.conf +++ /dev/null @@ -1,4 +0,0 @@ -# $redirectdomain is set via the redirects-map.conf within nginx.conf -if ($redirectdomain) { - return 301 $redirectdomain; -} \ No newline at end of file diff --git a/images/nginx/helpers/020_basic-auth.conf b/images/nginx/helpers/020_basic-auth.conf deleted file mode 100644 index 2929b801fa..0000000000 --- a/images/nginx/helpers/020_basic-auth.conf +++ /dev/null @@ -1,3 +0,0 @@ -# BASIC_AUTH is set during docker-entrypoint if BASIC_AUTH_USERNAME and BASIC_AUTH_PASSWORD are set -auth_basic "${BASIC_AUTH:-off}"; -auth_basic_user_file "/etc/nginx/.htpasswd"; \ No newline at end of file diff --git a/images/nginx/helpers/030_rewrite_by_lua_block.conf b/images/nginx/helpers/030_rewrite_by_lua_block.conf deleted file mode 100644 index b4de6f9c22..0000000000 --- a/images/nginx/helpers/030_rewrite_by_lua_block.conf +++ /dev/null @@ -1,14 +0,0 @@ -rewrite_by_lua_block { - -- IPv6 X-Forwarded-For - local xff = {} - if ngx.var.http_x_forwarded_for then - for ip in string.gmatch(ngx.var.http_x_forwarded_for, '([^,]+)') do - if string.find(ip, "^::ffff:") then - table.insert(xff,string.match(ip, "^::ffff:(.*)")) - else - table.insert(xff,ip) - end - ngx.req.set_header("X-Forwarded-For", table.concat(xff, ",")) - end - end -} diff --git a/images/nginx/helpers/100_x-robots-header-development.conf b/images/nginx/helpers/100_x-robots-header-development.conf deleted file mode 100644 index 2d084156aa..0000000000 --- a/images/nginx/helpers/100_x-robots-header-development.conf +++ /dev/null @@ -1,15 +0,0 @@ -# Set X-Robots-Tag to 'noindex, nofollow' for development environments and Lagoon autogenerated routes -header_filter_by_lua_block { - -- escape characters in the hostname - host = string.gsub(ngx.var.host, "%p", "%%%1") - - -- check to see if we are a development environment - if (os.getenv("LAGOON_ENVIRONMENT_TYPE") and string.match(os.getenv("LAGOON_ENVIRONMENT_TYPE"), 'development')) then - ngx.header["X-Robots-Tag"] = 'noindex, nofollow'; - end - - -- check hostname against autogenerated routes - if (os.getenv("LAGOON_AUTOGENERATED_ROUTES") and string.match(os.getenv("LAGOON_AUTOGENERATED_ROUTES"), host)) then - ngx.header["X-Robots-Tag"] = 'noindex, nofollow'; - end -} diff --git a/images/nginx/helpers/90_healthz.conf b/images/nginx/helpers/90_healthz.conf deleted file mode 100644 index 33356eda06..0000000000 --- a/images/nginx/helpers/90_healthz.conf +++ /dev/null @@ -1 +0,0 @@ -include /etc/nginx/conf.d/healthz.locations; diff --git a/images/nginx/helpers/90_healthz_fast_check.conf.disabled b/images/nginx/helpers/90_healthz_fast_check.conf.disabled deleted file mode 100644 index 78cb43761e..0000000000 --- a/images/nginx/helpers/90_healthz_fast_check.conf.disabled +++ /dev/null @@ -1,13 +0,0 @@ -set $fhcc none; - -if ( $http_user_agent ~* "StatusCake|Pingdom|Site25x7|Uptime|nagios" ) { - set $fhcc "A"; -} - -if ( $request_method = 'GET' ) { - set $fhcc "$fhcc G"; -} - -if ( $fhcc = 'A G' ) { - rewrite ~* /.lagoonhealthz last; -} \ No newline at end of file diff --git a/images/nginx/nginx.conf b/images/nginx/nginx.conf deleted file mode 100755 index 5fd14bfe25..0000000000 --- a/images/nginx/nginx.conf +++ /dev/null @@ -1,125 +0,0 @@ - -error_log /dev/stdout ${NGINX_ERROR_LOG_LEVEL:-warn}; - -# Establish some environment variables for later use -env LAGOON_AUTOGENERATED_ROUTES; -env LAGOON_ENVIRONMENT_TYPE; - -events { - worker_connections 1024; - multi_accept on; - use epoll; -} - - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /dev/stdout; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - - server_tokens off; - - add_header X-LAGOON $hostname always; - - uninitialized_variable_warn off; - - map $host$uri $redirectdomain { - include /etc/nginx/redirects-map.conf; - } - - gzip on; - gzip_disable "MSIE [1-6]\.(?!.*SV1)"; - - gzip_buffers 16 8k; - gzip_comp_level 1; - gzip_http_version 1.0; - gzip_min_length 10; - gzip_types - application/atom+xml - application/javascript - application/json - application/ld+json - application/manifest+json - application/rss+xml - application/vnd.geo+json - application/vnd.ms-fontobject - application/x-font-ttf - application/x-javascript - application/x-web-app-manifest+json - application/xhtml+xml - application/xml - application/xml+rss - font/opentype - image/bmp - image/svg+xml - image/x-icon - text/cache-manifest - text/css - text/javascript - text/plain - text/vcard - text/vnd.rim.location.xloc - text/vtt - text/xml - text/x-component - text/x-cross-domain-policy; - - client_max_body_size 2048m; - client_body_timeout 10s; - client_header_timeout 10s; - client_body_buffer_size 128k; - client_body_temp_path /tmp/client_temp; - proxy_redirect off; - proxy_max_temp_file_size 4096m; - proxy_connect_timeout 90; - proxy_send_timeout 90; - proxy_read_timeout 90; - proxy_buffers 32 16k; - proxy_buffer_size 16k; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_headers_hash_bucket_size 64; - proxy_temp_path /tmp/proxy_temp; - - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - - set_real_ip_from 10.0.0.0/8; - set_real_ip_from 172.16.0.0/12; - set_real_ip_from 192.168.0.0/16; - real_ip_header X-Forwarded-For; - real_ip_recursive on; - - port_in_redirect off; - - root /app; - - server { - - listen 50000; - - location /nginx_status { - stub_status on; - access_log off; - allow 127.0.0.1; - allow 10.0.0.0/8; - allow 172.16.0.0/12; - allow 192.168.0.0/16; - deny all; - } - - } - - include /etc/nginx/conf.d/*.conf; - -} diff --git a/images/nginx/redirects-map.conf b/images/nginx/redirects-map.conf deleted file mode 100644 index 6bb3595aeb..0000000000 --- a/images/nginx/redirects-map.conf +++ /dev/null @@ -1,26 +0,0 @@ -## Nginx redirect map -## This file is expected to have two entries per line: -## 1. source, which will be matched against '$host$uri' from nginx (so the hostname and uri, while uri is always at least /) -## 2. destination of the redirect -## The file is read from top to bottom, so more specific sources need to be above more general matches -## A couple of examples: - -## Simple www to non www redirect, with preserving the URL string and arguments -# ~^www\.example\.com\/ http://example.com$request_uri; - -## Simple non-www to www redirect, with preserving the URL string and arguments -#~^example\.com\/ http://www.example.com$request_uri; - -## Redirect every request to example.com to example.net with preserving the URL string and arguments, eg: example.com/bla -> example.net/bla, example.com/bla?test -> example.net/bla?test -## -# ~^example\.com\/ http://example.net$request_uri; - -## Redirect request only to example.com/test (no regex matching) to example.net without preserving the URL string, eg: example.com/test -> example.net -## Requestes to example.com/test/bla or example.com/bla are not matched -## -# example\.com\/test http://example.net; - -## Redirect request only to example.com/test to example.net with preserving the rest of the URL string and arguments, eg: example.com/test/bla -> example.net/bla, example.com/test/bla?test -> example.net/bla?test -## Requestes to example.com/bla are not matched -## -# ~^example\.com\/test\/(.*) http://example.net/$1$is_args$args; diff --git a/images/nginx/static-files.conf b/images/nginx/static-files.conf deleted file mode 100644 index ac5fc8802c..0000000000 --- a/images/nginx/static-files.conf +++ /dev/null @@ -1,12 +0,0 @@ -server { - - listen 8080 default_server; - - include /etc/nginx/helpers/*.conf; - - location / { - index index.html index.htm; - try_files $uri $uri/ =404; - } - -} \ No newline at end of file diff --git a/images/node/Dockerfile b/images/node/Dockerfile deleted file mode 100644 index 2a749d9c24..0000000000 --- a/images/node/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -ARG NODE_VERSION -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=node - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home \ - && fix-permissions /home \ - && mkdir -p /app \ - && fix-permissions /app - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk update \ - && apk upgrade \ - && rm -rf /var/cache/apk/* - -# Make sure Bower and NPM are allowed to be running as root -RUN echo '{ "allow_root": true }' > /home/.bowerrc \ - && echo 'unsafe-perm=true' > /home/.npmrc - -WORKDIR /app - -EXPOSE 3000 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=3000 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["yarn", "run", "start"] diff --git a/images/node/builder/Dockerfile b/images/node/builder/Dockerfile deleted file mode 100644 index c55b594b6f..0000000000 --- a/images/node/builder/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG NODE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/node:${NODE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=node - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache \ - libstdc++ \ - && apk add --no-cache \ - binutils-gold \ - curl \ - g++ \ - gcc \ - gnupg \ - libgcc \ - linux-headers \ - make \ - git \ - file \ - openssl \ - python \ - bash \ - ca-certificates \ - wget \ - libpng-dev \ - && curl -sSLo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ - && curl -sSLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk \ - && apk add glibc-2.28-r0.apk \ - && rm -rf /var/cache/apk/* - -CMD ["/bin/docker-sleep"] diff --git a/images/oc-build-deploy-dind/README.md b/images/oc-build-deploy-dind/README.md index ef2fddc2c2..79b3492bae 100644 --- a/images/oc-build-deploy-dind/README.md +++ b/images/oc-build-deploy-dind/README.md @@ -49,4 +49,4 @@ In order for better working of a container created from this image, there are so -v $WORKSPACE:/git \\ - -v /var/run/docker.sock:/var/run/docker.sock \\ + -v /var/run/docker.sock:/var/run/docker.sock \\ \ No newline at end of file diff --git a/images/oc/Dockerfile b/images/oc/Dockerfile index a7c5e72b5a..ae101b59e5 100644 --- a/images/oc/Dockerfile +++ b/images/oc/Dockerfile @@ -1,6 +1,7 @@ ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM golang:1.13-alpine${ALPINE_VERSION} as golang RUN apk add --no-cache git diff --git a/images/php/cli-drupal/Dockerfile b/images/php/cli-drupal/Dockerfile deleted file mode 100644 index a228a40adb..0000000000 --- a/images/php/cli-drupal/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -ARG PHP_VERSION -ARG PHP_IMAGE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-cli - -LABEL maintainer="amazee.io" -ENV LAGOON=cli-drupal - -# Defining Versions - https://github.com/hechoendrupal/drupal-console-launcher/releases -ENV DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.4 \ - DRUPAL_CONSOLE_LAUNCHER_SHA=b7759279668caf915b8e9f3352e88f18e4f20659 \ - DRUSH_VERSION=8.3.5 \ - DRUSH_LAUNCHER_VERSION=0.6.0 \ - DRUSH_LAUNCHER_FALLBACK=/opt/drush8/vendor/bin/drush - -RUN curl -sSLo /usr/local/bin/drupal "https://github.com/hechoendrupal/drupal-console-launcher/releases/download/${DRUPAL_CONSOLE_LAUNCHER_VERSION}/drupal.phar" \ - && echo "${DRUPAL_CONSOLE_LAUNCHER_SHA} /usr/local/bin/drupal" | sha1sum \ - && chmod +x /usr/local/bin/drupal \ - && mkdir -p /opt/drush8 \ - && php /usr/local/bin/composer init -n -d /opt/drush8 --require=drush/drush:${DRUSH_VERSION} \ - && php -d memory_limit=-1 /usr/local/bin/composer update -n -d /opt/drush8 \ - && curl -sSLo /usr/local/bin/drush "https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VERSION}/drush.phar" \ - && chmod +x /usr/local/bin/drush \ - && mkdir -p /home/.drush - -COPY drushrc.php drush.yml /home/.drush/ - -RUN fix-permissions /home/.drush diff --git a/images/php/cli-drupal/drush.yml b/images/php/cli-drupal/drush.yml deleted file mode 100644 index 4bab95e5ef..0000000000 --- a/images/php/cli-drupal/drush.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Lagoon global drush.yml file -# This file tells Drush 9 about the lagoon environment - -options: - root: '/app/${env.WEBROOT}' - uri: '${env.LAGOON_ROUTE}' \ No newline at end of file diff --git a/images/php/cli-drupal/drushrc.php b/images/php/cli-drupal/drushrc.php deleted file mode 100644 index ee9aad89e4..0000000000 --- a/images/php/cli-drupal/drushrc.php +++ /dev/null @@ -1,23 +0,0 @@ - TRUE, 'no-perms' => TRUE, 'no-group' => TRUE, 'no-owner' => TRUE, 'chmod' => 'ugo=rwX'); \ No newline at end of file diff --git a/images/php/cli/05-ssh-key.sh b/images/php/cli/05-ssh-key.sh deleted file mode 100755 index cfab3b42f3..0000000000 --- a/images/php/cli/05-ssh-key.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -# If we there is an ssh key injected via lagoon and kubernetes, we use that -if [ -f /var/run/secrets/lagoon/sshkey/ssh-privatekey ]; then - cp -f /var/run/secrets/lagoon/sshkey/ssh-privatekey /home/.ssh/key -# If there is an env variable SSH_PRIVATE_KEY we use that -elif [ ! -z "$SSH_PRIVATE_KEY" ]; then - echo -e "$SSH_PRIVATE_KEY" > /home/.ssh/key -# If there is an env variable LAGOON_SSH_PRIVATE_KEY we use that -elif [ ! -z "$LAGOON_SSH_PRIVATE_KEY" ]; then - echo -e "$LAGOON_SSH_PRIVATE_KEY" > /home/.ssh/key -fi - -if [ -f /home/.ssh/key ]; then - # add a new line to the key. OpenSSH is very picky that keys are always end with a newline - echo >> /home/.ssh/key - # Fix permissions of SSH key - chmod 600 /home/.ssh/key -fi diff --git a/images/php/cli/10-ssh-agent.sh b/images/php/cli/10-ssh-agent.sh deleted file mode 100644 index e75f44581e..0000000000 --- a/images/php/cli/10-ssh-agent.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -e - -# Test if pygmy or cachalot ssh-agents are mounted and symlink them as our known ssh-auth-sock file. -# This will only be used in local development -if [ -S /tmp/amazeeio_ssh-agent/socket ]; then - ln -sf /tmp/amazeeio_ssh-agent/socket $SSH_AUTH_SOCK -# Use the existing key instead (which was generated from 05-ssh-key.sh) -elif [ -f /home/.ssh/key ]; then - rm -f $SSH_AUTH_SOCK - eval $(ssh-agent -a $SSH_AUTH_SOCK) - ssh-add /home/.ssh/key -fi diff --git a/images/php/cli/55-cli-helpers.sh b/images/php/cli/55-cli-helpers.sh deleted file mode 100644 index ea7133ce41..0000000000 --- a/images/php/cli/55-cli-helpers.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -dsql () { - drush sql-sync $1 @self -} - -dfiles () { - drush rsync $1:%files @self:%files -} diff --git a/images/php/cli/61-php-xdebug-cli-env.sh b/images/php/cli/61-php-xdebug-cli-env.sh deleted file mode 100755 index 3db4afa3f4..0000000000 --- a/images/php/cli/61-php-xdebug-cli-env.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# Only if XDEBUG_ENABLE is not empty -if [ ! -z ${XDEBUG_ENABLE} ]; then - # XDEBUG_CONFIG is used by xdebug to decide if an xdebug session should be started in the CLI or not. - # The content doesn't really matter it just needs to be set, the actual connection details are loaded from /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - export XDEBUG_CONFIG="idekey=lagoon" - - # PHP_IDE_CONFIG is used by PhpStorm and should be the URL of the project, we use the `LAGOON_ROUTE` for it (if it exists) - if [ ${LAGOON_ROUTE+x} ]; then - SERVERNAME=$(echo $LAGOON_ROUTE | sed 's/https\?:\/\///') - else - SERVERNAME="lagoon" - fi - export PHP_IDE_CONFIG="serverName=${SERVERNAME}" -fi - diff --git a/images/php/cli/80-shell-timeout.sh b/images/php/cli/80-shell-timeout.sh deleted file mode 100644 index fdc02f389e..0000000000 --- a/images/php/cli/80-shell-timeout.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# If we are running within kubernetes, set a shell timeout of 10mins. -# We do that so old shells are closed and we can idle the cli container -if [ $KUBERNETES_PORT ]; then - TMOUT=600 -fi \ No newline at end of file diff --git a/images/php/cli/90-composer-path.sh b/images/php/cli/90-composer-path.sh deleted file mode 100644 index f18e7d1bf5..0000000000 --- a/images/php/cli/90-composer-path.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -add_to_PATH () { - for d; do - case ":$PATH:" in - *":$d:"*) :;; - *) PATH=$d:$PATH;; - esac - done -} - -add_to_PATH /home/.composer/vendor/bin diff --git a/images/php/cli/90-mariadb-envplate.sh b/images/php/cli/90-mariadb-envplate.sh deleted file mode 100644 index 5f8dbe0a45..0000000000 --- a/images/php/cli/90-mariadb-envplate.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -/bin/ep /etc/my.cnf.d/* diff --git a/images/php/cli/Dockerfile b/images/php/cli/Dockerfile deleted file mode 100644 index cc6aa703f9..0000000000 --- a/images/php/cli/Dockerfile +++ /dev/null @@ -1,82 +0,0 @@ -ARG PHP_VERSION -ARG IMAGE_REPO -ARG PHP_IMAGE_VERSION -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-fpm - -LABEL maintainer="amazee.io" -ENV LAGOON=cli - -# Defining Versions - Composer -# @see https://getcomposer.org/download/ -ENV COMPOSER_VERSION=1.10.9 \ - COMPOSER_HASH_SHA256=70d6b9c3e0774b398a372dcb7f89dfe22fc25884e6e09ebf277286dd64cfaf35 - -COPY --from=commons /bin/entrypoint-readiness /bin/ - -RUN apk add --no-cache git \ - unzip \ - gzip \ - bash \ - tini \ - openssh-client \ - rsync \ - patch \ - procps \ - coreutils \ - mariadb-client \ - postgresql-client \ - mongodb-tools \ - openssh-sftp-server \ - findutils \ - nodejs-current \ - nodejs-npm \ - yarn \ - && ln -s /usr/lib/ssh/sftp-server /usr/local/bin/sftp-server \ - && rm -rf /var/cache/apk/* \ - && curl -sSLo /usr/local/bin/composer https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \ - && echo "$COMPOSER_HASH_SHA256 /usr/local/bin/composer" | sha256sum \ - && chmod +x /usr/local/bin/composer \ - && php -d memory_limit=-1 /usr/local/bin/composer global require hirak/prestissimo \ - && mkdir -p /home/.ssh \ - && fix-permissions /home/ - -# Adding Composer vendor bin path to $PATH. -ENV PATH="/home/.composer/vendor/bin:${PATH}" -# We not only use "export $PATH" as this could be overwritten again -# like it happens in /etc/profile of alpine Images. -COPY 90-composer-path.sh /lagoon/entrypoints/ - -# Remove warning about running as root in composer -ENV COMPOSER_ALLOW_SUPERUSER=1 - -# Making sure the path is not only added during entrypoint, but also when creating a new shell -RUN echo "source /lagoon/entrypoints/90-composer-path.sh" >> /home/.bashrc - -# Make sure shells are not running forever -COPY 80-shell-timeout.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc - -# Make sure xdebug is automatically enabled also for cli scripts -COPY 61-php-xdebug-cli-env.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/61-php-xdebug-cli-env.sh" >> /home/.bashrc - -# Copy mariadb-client configuration. -COPY 90-mariadb-envplate.sh /lagoon/entrypoints/ -COPY mariadb-client.cnf /etc/my.cnf.d/ -RUN fix-permissions /etc/my.cnf.d/ - -# helper functions -COPY 55-cli-helpers.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/55-cli-helpers.sh" >> /home/.bashrc - -# SSH Key and Agent Setup -COPY 05-ssh-key.sh /lagoon/entrypoints/ -COPY 10-ssh-agent.sh /lagoon/entrypoints/ -COPY ssh_config /etc/ssh/ssh_config -COPY id_ed25519_lagoon_cli.key /home/.ssh/lagoon_cli.key -RUN chmod 400 /home/.ssh/lagoon_cli.key -ENV SSH_AUTH_SOCK=/tmp/ssh-agent - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/bin/docker-sleep"] diff --git a/images/php/cli/README.md b/images/php/cli/README.md deleted file mode 100644 index 105a752f06..0000000000 --- a/images/php/cli/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Alpine PHP CLI Image - -## Use another Node.js Version - -By default this Image ships with the current Node.js Version (v9 at time of writing this). If you need another Version you can remove the current version and install the one of your choice. - -Add these commands as parts of your customized Dockerfile within `RUN` commands. - -#### Remove current version (needed for installing any other Version) - - RUN apk del --no-cache nodejs-current yarn --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ - -#### Install Node.js Version 6 - - RUN apk add --no-cache nodejs yarn --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ - -#### Install Node.js Version 8 - - RUN apk add --no-cache nodejs yarn --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ diff --git a/images/php/cli/id_ed25519_lagoon_cli.key b/images/php/cli/id_ed25519_lagoon_cli.key deleted file mode 100644 index 3e4a43f9e5..0000000000 --- a/images/php/cli/id_ed25519_lagoon_cli.key +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN OPENSSH PRIVATE KEY----- -b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW -QyNTUxOQAAACCFGJJXzBNtfjlGlt7lsXsiM0WDSGVcRSkcF22WS0ErMgAAAJB8dgK3fHYC -twAAAAtzc2gtZWQyNTUxOQAAACCFGJJXzBNtfjlGlt7lsXsiM0WDSGVcRSkcF22WS0ErMg -AAAEC0XD5LwsT4v+f/DsslBBOZT3kW17Br+jdXvfoReRfjN4UYklfME21+OUaW3uWxeyIz -RYNIZVxFKRwXbZZLQSsyAAAACmxhZ29vbi1jbGkBAgM= ------END OPENSSH PRIVATE KEY----- diff --git a/images/php/cli/mariadb-client.cnf b/images/php/cli/mariadb-client.cnf deleted file mode 100644 index ddae2ddd2e..0000000000 --- a/images/php/cli/mariadb-client.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[client] -max_allowed_packet = ${MARIADB_MAX_ALLOWED_PACKET:-64M} diff --git a/images/php/cli/ssh_config b/images/php/cli/ssh_config deleted file mode 100644 index 0927994629..0000000000 --- a/images/php/cli/ssh_config +++ /dev/null @@ -1,7 +0,0 @@ -Host * - StrictHostKeyChecking no - UserKnownHostsFile /dev/null - IdentityFile /home/.ssh/lagoon_cli.key - IdentityFile /home/.ssh/key - ServerAliveInterval 60 - ServerAliveCountMax 1440 diff --git a/images/php/fpm/00-lagoon-php.ini.tpl b/images/php/fpm/00-lagoon-php.ini.tpl deleted file mode 100644 index ba428eaf3c..0000000000 --- a/images/php/fpm/00-lagoon-php.ini.tpl +++ /dev/null @@ -1,17 +0,0 @@ -[PHP] -max_execution_time = ${PHP_MAX_EXECUTION_TIME:-900} -max_input_vars = ${PHP_MAX_INPUT_VARS:-2000} -max_file_uploads = ${PHP_MAX_FILE_UPLOADS:-20} -memory_limit = ${PHP_MEMORY_LIMIT:-400M} -display_errors = ${PHP_DISPLAY_ERRORS:-Off} -display_startup_errors = ${PHP_DISPLAY_STARTUP_ERRORS:-Off} -auto_prepend_file = ${PHP_AUTO_PREPEND_FILE:-none} -auto_append_file = ${PHP_AUTO_APPEND_FILE:-none} -error_reporting = ${PHP_ERROR_REPORTING:-E_ALL & ~E_DEPRECATED & ~E_STRICT} - -[APC] -apc.shm_size = ${PHP_APC_SHM_SIZE:-32m} -apc.enabled = ${PHP_APC_ENABLED:-1} - -[xdebug] -xdebug.remote_enable = on diff --git a/images/php/fpm/Dockerfile b/images/php/fpm/Dockerfile deleted file mode 100644 index f2a3d3b1a7..0000000000 --- a/images/php/fpm/Dockerfile +++ /dev/null @@ -1,136 +0,0 @@ -ARG PHP_VERSION -ARG PHP_IMAGE_VERSION -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons - -FROM composer:latest as healthcheckbuilder - -RUN composer create-project --no-dev amazeeio/healthz-php /healthz-php v0.0.6 - -FROM php:${PHP_IMAGE_VERSION}-fpm-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=php - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -# Copy healthcheck files - -COPY --from=healthcheckbuilder /healthz-php /healthz-php - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -COPY check_fcgi /usr/sbin/ -COPY entrypoints/70-php-config.sh entrypoints/60-php-xdebug.sh entrypoints/50-ssmtp.sh entrypoints/71-php-newrelic.sh /lagoon/entrypoints/ - -COPY php.ini /usr/local/etc/php/ -COPY 00-lagoon-php.ini.tpl /usr/local/etc/php/conf.d/ -COPY php-fpm.d/www.conf /usr/local/etc/php-fpm.d/www.conf -COPY ssmtp.conf /etc/ssmtp/ssmtp.conf - -# New Relic PHP Agent. -# @see https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes/ -# @see https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements -ENV NEWRELIC_VERSION=9.12.0.268 - -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.12/main/ 'curl>7.68' 'libcurl>7.68' - -RUN apk add --no-cache fcgi \ - ssmtp \ - libzip libzip-dev \ - # for gd - libpng-dev \ - libjpeg-turbo-dev \ - # for gettext - gettext-dev \ - # for mcrypt - libmcrypt-dev \ - # for soap - libxml2-dev \ - # for xsl - libxslt-dev \ - libgcrypt-dev \ - # for webp - libwebp-dev \ - postgresql-dev \ - # for yaml - yaml-dev \ - # for imagemagick - imagemagick \ - imagemagick-libs \ - imagemagick-dev \ - && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \ - && yes '' | pecl install -f apcu \ - && yes '' | pecl install -f xdebug \ - && yes '' | pecl install -f yaml \ - && yes '' | pecl install -f redis-4.3.0 \ - && yes '' | pecl install -f imagick \ - && docker-php-ext-enable apcu redis xdebug imagick \ - && case ${PHP_VERSION} in \ - 7.4*) \ - docker-php-ext-configure gd --with-webp --with-jpeg \ - ;; \ - *) \ - docker-php-ext-configure gd --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ - ;; \ - esac \ - && docker-php-ext-install -j4 bcmath gd gettext pdo_mysql mysqli pdo_pgsql pgsql shmop soap sockets opcache xsl zip \ - && sed -i '1s/^/;Intentionally disabled. Enable via setting env variable XDEBUG_ENABLE to true\n;/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ - && rm -rf /var/cache/apk/* /tmp/pear/ \ - && apk del .phpize-deps \ - && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/yaml.ini \ - && mkdir -p /tmp/newrelic && cd /tmp/newrelic \ - && curl -sSLO https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz \ - && gzip -dc newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz | tar --strip-components=1 -xf - \ - && NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install \ - && sed -i -e "s/newrelic.appname = .*/newrelic.appname = \"\${LAGOON_PROJECT:-noproject}-\${LAGOON_GIT_SAFE_BRANCH:-nobranch}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.enabled = .*/newrelic.enabled = \${NEWRELIC_ENABLED:-false}/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.browser_monitoring.auto_instrument = .*/newrelic.browser_monitoring.auto_instrument = \${NEWRELIC_BROWSER_MONITORING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/newrelic.license = .*/newrelic.license = \"\${NEWRELIC_LICENSE:-}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.loglevel = .*/newrelic.loglevel = \"\${NEWRELIC_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.daemon.loglevel = .*/newrelic.daemon.loglevel = \"\${NEWRELIC_DAEMON_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/newrelic.logfile = .*/newrelic.logfile = \"\/dev\/stdout\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/newrelic.daemon.logfile = .*/newrelic.daemon.logfile = \"\/dev\/stdout\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.disable \ - && cd / && rm -rf /tmp/newrelic \ - && mkdir -p /app \ - && fix-permissions /usr/local/etc/ \ - && fix-permissions /app \ - && fix-permissions /etc/ssmtp/ssmtp.conf - -EXPOSE 9000 - -ENV AMAZEEIO_DB_HOST=mariadb \ - AMAZEEIO_DB_PORT=3306 \ - AMAZEEIO_DB_USERNAME=drupal \ - AMAZEEIO_DB_PASSWORD=drupal \ - AMAZEEIO_SITENAME=drupal \ - AMAZEEIO_SITE_NAME=drupal \ - AMAZEEIO_SITE_ENVIRONMENT=development \ - AMAZEEIO_HASH_SALT=0000000000000000000000000 \ - AMAZEEIO_TMP_PATH=/tmp \ - AMAZEEIO_LOCATION=docker - -ENV LAGOON_ENVIRONMENT_TYPE=development - -WORKDIR /app - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/usr/local/sbin/php-fpm", "-F", "-R"] diff --git a/images/php/fpm/README.md b/images/php/fpm/README.md deleted file mode 100644 index 4d8f8f8229..0000000000 --- a/images/php/fpm/README.md +++ /dev/null @@ -1 +0,0 @@ -Please reference the [Lagoon Docs](https://lagoon.readthedocs.io/en/latest/using_lagoon/docker_images/php-fpm/) diff --git a/images/php/fpm/check_fcgi b/images/php/fpm/check_fcgi deleted file mode 100755 index 8af1d53ba6..0000000000 --- a/images/php/fpm/check_fcgi +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# cgi-fcgi has issues with non-standard environment variables, so this script -# is called with "env -i" to clean the environment -# This script calls the /ping endpoing of the php-fpm, if the return code is 0, the php-fpm has correctly started -env -i SCRIPT_NAME=/${1:-ping} SCRIPT_FILENAME=/${1:-ping} REQUEST_METHOD=GET /usr/bin/cgi-fcgi -bind -connect 127.0.0.1:9000 diff --git a/images/php/fpm/entrypoints/50-ssmtp.sh b/images/php/fpm/entrypoints/50-ssmtp.sh deleted file mode 100755 index c5a51f7ea1..0000000000 --- a/images/php/fpm/entrypoints/50-ssmtp.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - - -if [ ${SSMTP_REWRITEDOMAIN+x} ]; then - echo -e "\nrewriteDomain=${SSMTP_REWRITEDOMAIN}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_AUTHUSER+x} ]; then - echo -e "\nAuthUser=${SSMTP_AUTHUSER}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_AUTHPASS+x} ]; then - echo -e "\nAuthPass=${SSMTP_AUTHPASS}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_USETLS+x} ]; then - echo -e "\nUseTLS=${SSMTP_USETLS}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_USESTARTTLS+x} ]; then - echo -e "\nUseSTARTTLS=${SSMTP_USESTARTTLS}" >> /etc/ssmtp/ssmtp.conf -fi - -if [ ${SSMTP_MAILHUB+x} ]; then - echo -e "\nmailhub=${SSMTP_MAILHUB}" >> /etc/ssmtp/ssmtp.conf -else - # check if we find a mailhog on 172.17.0.1:1025 - if nc -z -w 1 172.17.0.1 1025 &> /dev/null; then - echo -e "\nmailhub=172.17.0.1:1025" >> /etc/ssmtp/ssmtp.conf - return - fi - # check if mxout.lagoon.svc can do smtp TLS - if nc -z -w 1 mxout.lagoon.svc 465 &> /dev/null; then - echo -e "UseTLS=Yes\nmailhub=mxout.lagoon.svc:465" >> /etc/ssmtp/ssmtp.conf - return - fi - # Fallback: check if mxout.lagoon.svc can do regular 25 smtp - if nc -z -w 1 mxout.lagoon.svc 25 &> /dev/null; then - echo -e "\nmailhub=mxout.lagoon.svc:25" >> /etc/ssmtp/ssmtp.conf - return - fi - # check if mxout.default.svc can do smtp TLS - if nc -z -w 1 mxout.default.svc 465 &> /dev/null; then - echo -e "UseTLS=Yes\nmailhub=mxout.default.svc:465" >> /etc/ssmtp/ssmtp.conf - return - fi - # Fallback: check if mxout.default.svc can do regular 25 smtp - if nc -z -w 1 mxout.default.svc 25 &> /dev/null; then - echo -e "\nmailhub=mxout.default.svc:25" >> /etc/ssmtp/ssmtp.conf - return - fi -fi diff --git a/images/php/fpm/entrypoints/51-production-detection.sh b/images/php/fpm/entrypoints/51-production-detection.sh deleted file mode 100644 index ce5b12eee3..0000000000 --- a/images/php/fpm/entrypoints/51-production-detection.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [[ -z "${PHP_ERROR_REPORTING}" ]]; then - if [[ ${LAGOON_ENVIRONMENT_TYPE} == "production" ]]; then - export PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE" - fi -fi diff --git a/images/php/fpm/entrypoints/60-php-xdebug.sh b/images/php/fpm/entrypoints/60-php-xdebug.sh deleted file mode 100755 index 1d05a274f1..0000000000 --- a/images/php/fpm/entrypoints/60-php-xdebug.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# Tries to find the Dockerhost -get_dockerhost() { - # https://docs.docker.com/docker-for-mac/networking/#known-limitations-use-cases-and-workarounds - if busybox timeout 1 busybox nslookup -query=A host.docker.internal &> /dev/null; then - echo "host.docker.internal" - return - fi - - # Fallback to default gateway (should work on Linux) see https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach - echo $(route -n | awk '/UG[ \t]/{print $2}') - return -} - -# Only if XDEBUG_ENABLE is not empty -if [ ! -z ${XDEBUG_ENABLE} ]; then - # remove first line and all comments - sed -i '1d; s/;//' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - # add comment that explains how we have xdebug enabled - sed -i '1s/^/;xdebug enabled as XDEBUG_ENABLE is not empty, see \/lagoon\/entrypoints\/60-php-xdebug.sh \n/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - - # Only if DOCKERHOST is not already set, allows to set a DOCKERHOST via environment variables - if [[ -z ${DOCKERHOST+x} ]]; then - DOCKERHOST=$(get_dockerhost) - fi - - # Add the found remote_host to xdebug.ini - echo -e "\n\nxdebug.remote_host=${DOCKERHOST}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - - if [ ${XDEBUG_LOG+x} ]; then - echo -e "\n\nxdebug.remote_log=/tmp/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - fi -fi diff --git a/images/php/fpm/entrypoints/70-php-config.sh b/images/php/fpm/entrypoints/70-php-config.sh deleted file mode 100755 index 257c9ac8c5..0000000000 --- a/images/php/fpm/entrypoints/70-php-config.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cp /usr/local/etc/php/conf.d/00-lagoon-php.ini.tpl /usr/local/etc/php/conf.d/00-lagoon-php.ini && ep /usr/local/etc/php/conf.d/00-lagoon-php.ini -ep /usr/local/etc/php-fpm.conf -ep /usr/local/etc/php-fpm.d/* \ No newline at end of file diff --git a/images/php/fpm/entrypoints/71-php-newrelic.sh b/images/php/fpm/entrypoints/71-php-newrelic.sh deleted file mode 100755 index e1b1bb0d54..0000000000 --- a/images/php/fpm/entrypoints/71-php-newrelic.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# enable newrelic only if NEWRELIC_ENABLED is set -if [ ${NEWRELIC_ENABLED+x} ]; then - # envplate the newrelic ini file - ep /usr/local/etc/php/conf.d/newrelic.disable - - cp /usr/local/etc/php/conf.d/newrelic.disable /usr/local/etc/php/conf.d/newrelic.ini - - # check if newrelic is running before trying to do tasks as it can cause them to fail, can delay container start by a few seconds - # https://discuss.newrelic.com/t/php-agents-tries-to-connect-before-daemon-is-ready/48160/9 - php -r '$count=0;while(!newrelic_set_appname(ini_get("newrelic.appname")) && $count < 10){ $count++; echo "Waiting for NewRelic Agent to be responsive. ($count)" . PHP_EOL; sleep(1); }' -fi diff --git a/images/php/fpm/php-fpm.d/www.conf b/images/php/fpm/php-fpm.d/www.conf deleted file mode 100644 index 3aa6fcd85c..0000000000 --- a/images/php/fpm/php-fpm.d/www.conf +++ /dev/null @@ -1,119 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = [::]:9000 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN:-50} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = ${PHP_FPM_PM_START_SERVERS:-2} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS:-2} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS:-2} - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -pm.process_idle_timeout = ${PHP_FPM_PM_PROCESS_IDLE_TIMEOUT:-60s} - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS:-500} - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -ping.response = pong - -; PHP FPM Status Page -pm.status_path = /status - -; The access log file -; Default: not set -access.log = ${PHP_FPM_ACCESS_LOG:-/dev/null} - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -clear_env = no diff --git a/images/php/fpm/php.ini b/images/php/fpm/php.ini deleted file mode 100644 index 55009fc640..0000000000 --- a/images/php/fpm/php.ini +++ /dev/null @@ -1,1587 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; http://php.net/realpath-cache-size -;realpath_cache_size = 16k -realpath_cache_size = 256k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 -realpath_cache_ttl = 3600 - -; Enables or disables the circular reference collector. -; http://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -; Default: Off -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -; Default: "" -;zend.script_encoding = - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = 0 - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 900 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 900 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -max_input_vars = 1000 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 400M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it is automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; For production environments, we recommend logging errors rather than -; sending them to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. We strongly recommend you -; set this to 'off' for production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is on by default. -;report_zend_debug = 0 - -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/track-errors -track_errors = Off - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: On -; Development Value: On -; Production value: On -; http://php.net/html-errors -html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog. -;error_log = syslog - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P & C) should be -; registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive -; are specified in the same manner as the variables_order directive, -; EXCEPT one. Leaving this value empty will cause PHP to use the value set -; in the variables_order directive. It does not mean it will leave the super -; globals array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any affect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; http://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; http://php.net/post-max-size -post_max_size = 2048M - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = none - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = none - -; By default, PHP will output a character encoding using -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to UTF-8. -; http://php.net/default-charset -default_charset = "UTF-8" - -; PHP internal character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/internal-encoding -;internal_encoding = - -; PHP input character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/input-encoding -;input_encoding = - -; PHP output character encoding is set to empty. -; If empty, default_charset is used. -; mbstring or iconv output handler is used. -; See also output_buffer. -; http://php.net/output-encoding -;output_encoding = - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -; extension_dir = "./" -; On windows: -; extension_dir = "ext" - -; Directory where the temporary files should be placed. -; Defaults to the system default (see sys_get_temp_dir) -; sys_temp_dir = "/tmp" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -cgi.fix_pathinfo=0 - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If set to 0, PHP sends Status: header that -; is supported by Apache. When this option is set to 1, PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 2048M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; ... or with a path: -; -; extension=/path/to/extension/msql.so -; -; If you only provide the name of the extension, PHP will look for it in its -; default extension directory. - -;;;; -; Note: packaged extension modules are now loaded via the .ini files -; found in the directory /etc/php.d; these are loaded by default. -;;;; - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -date.timezone = UTC - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -; Use of this INI entry is deprecated, use global input_encoding instead. -; If empty, default_charset or input_encoding or iconv.input_encoding is used. -; The precedence is: default_charset < intput_encoding < iconv.input_encoding -;iconv.input_encoding = - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;iconv.internal_encoding = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; If empty, default_charset or output_encoding or iconv.output_encoding is used. -; The precedence is: default_charset < output_encoding < iconv.output_encoding -; To use an output encoding conversion, iconv's output handler must be set -; otherwise output encoding conversion cannot be performed. -;iconv.output_encoding = - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING - -[sqlite] -; http://php.net/sqlite.assoc-case -;sqlite.assoc_case = 0 - -[sqlite3] -;sqlite3.extension_dir = - -[Pcre] -;PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -;PCRE library recursion limit. -;Please note that if you set this value to a high number you may consume all -;the available process stack and eventually crash PHP (due to reaching the -;stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -;Enables or disables JIT compilation of patterns. This requires the PCRE -;library to be compiled with JIT support. -pcre.jit=0 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -;pdo_odbc.db2_instance_name - -[Pdo_mysql] -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/pdo_mysql.cache_size -pdo_mysql.cache_size = 2000 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/pdo_mysql.default-socket -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -;phar.readonly = On - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -sendmail_path = /usr/sbin/sendmail -t -i - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(). -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = On - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog; -;mail.log = syslog - -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -;birdstep.max_links = -1 - -[Interbase] -; Allow or prevent persistent links. -ibase.allow_persistent = 1 - -; Maximum number of persistent links. -1 means no limit. -ibase.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -ibase.max_links = -1 - -; Default database name for ibase_connect(). -;ibase.default_db = - -; Default username for ibase_connect(). -;ibase.default_user = - -; Default password for ibase_connect(). -;ibase.default_password = - -; Default charset for ibase_connect(). -;ibase.default_charset = - -; Default timestamp format. -ibase.timestampformat = "%Y-%m-%d %H:%M:%S" - -; Default date format. -ibase.dateformat = "%Y-%m-%d" - -; Default time format. -ibase.timeformat = "%H:%M:%S" - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysqli.cache_size -mysqli.cache_size = 2000 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_statistics -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_memory_statistics -mysqlnd.collect_memory_statistics = Off - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -; http://php.net/mysqlnd.net_cmd_buffer_size -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -; http://php.net/mysqlnd.net_read_buffer_size -;mysqlnd.net_read_buffer_size = 32768 - -[PostgreSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if -; your OS has problems with many files in one directory, and is -; a more efficient layout for servers that handle many sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path - -; RPM note : session directory must be owned by process owner -; for mod_php, see /etc/httpd/conf.d/php.conf -; for php-fpm, see /etc/php-fpm.d/*conf -;session.save_path = "/tmp" - -; Whether to use strict session mode. -; Strict session mode does not accept uninitialized session ID and regenerate -; session ID if browser sends uninitialized session ID. Strict mode protects -; applications from session fixation via session adoption vulnerability. It is -; disabled by default for maximum compatibility, but enabling it is encouraged. -; https://wiki.php.net/rfc/strict_sessions -session.use_strict_mode = 0 - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the be-all and end-all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 2000000 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started -; on every session initialization. The probability is calculated by using -; gc_probability/gc_divisor. Where session.gc_probability is the numerator -; and gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 1 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using the following equation: -; gc_probability/gc_divisor. Where session.gc_probability is the numerator and -; session.gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. Increasing this value to 1000 will give you -; a 0.1% chance the gc will run on any give request. For high volume production servers, -; this is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 200000 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 -type f | xargs rm - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; How many bytes to read from the file. -; http://php.net/session.entropy-length -;session.entropy_length = 32 - -; Specified here to create the session id. -; http://php.net/session.entropy-file -; Defaults to /dev/urandom -; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom -; If neither are found at compile time, the default is no entropy file. -; On windows, setting the entropy_length setting will activate the -; Windows random source (using the CryptoAPI) -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users' security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Select a hash function for use in generating session ids. -; Possible Values -; 0 (MD5 128 bits) -; 1 (SHA-1 160 bits) -; This option may also be set to the name of any hash function supported by -; the hash extension. A list of available hashes is returned by the hash_algos() -; function. -; http://php.net/session.hash-function -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.hash_bits_per_character = 5 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; http://php.net/url-rewriter.tags -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; http://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; http://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; http://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -[Assertion] -; Switch whether to compile assertions at all (to have no overhead at run-time) -; -1: Do not compile at all -; 0: Jump over assertion at run-time -; 1: Execute assertions -; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) -; Default Value: 1 -; Development Value: 1 -; Production Value: -1 -; http://php.net/zend.assertions -zend.assertions = -1 - -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Throw an AssertationException on failed assertions -; http://php.net/assert.exception -;assert.exception = On - -; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - -[mbstring] -; language for internal character representation. -; This affects mb_send_mail() and mbstring.detect_order. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; internal/script encoding. -; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;mbstring.internal_encoding = - -; Use of this INI entry is deprecated, use global input_encoding instead. -; http input encoding. -; mbstring.encoding_traslation = On is needed to use this setting. -; If empty, default_charset or input_encoding or mbstring.input is used. -; The precedence is: default_charset < intput_encoding < mbsting.http_input -; http://php.net/mbstring.http-input -;mbstring.http_input = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; http output encoding. -; mb_output_handler must be registered as output buffer to function. -; If empty, default_charset or output_encoding or mbstring.http_output is used. -; The precedence is: default_charset < output_encoding < mbstring.http_output -; To use an output encoding conversion, mbstring's output handler must be set -; otherwise output encoding conversion cannot be performed. -; http://php.net/mbstring.http-output -;mbstring.http_output = - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; "auto" detect order is changed according to mbstring.language -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none - -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -; Default: Off -;mbstring.strict_detection = On - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetype= - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 0 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir - -; RPM note : cache directory must be owned by process owner -; for mod_php, see /etc/httpd/conf.d/php.conf -; for php-fpm, see /etc/php-fpm.d/*conf -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[mcrypt] -; For more information about mcrypt settings see http://php.net/mcrypt-module-open - -; Directory where to load mcrypt algorithms -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.algorithms_dir= - -; Directory where to load mcrypt modes -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.modes_dir= - -[dba] -;dba.default_handler= - -[opcache] -; Determines if Zend OPCache is enabled -;opcache.enable=0 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 - -; The OPcache shared memory storage size. -;opcache.memory_consumption=64 -opcache.memory_consumption=256 - -; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=4 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 100000 are allowed. -;opcache.max_accelerated_files=2000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -;opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the -; size of the optimized code. -;opcache.save_comments=1 - -; If enabled, a fast shutdown sequence is used for the accelerated code -;opcache.fast_shutdown=0 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 -opcache.enable_file_override=1 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0xffffffff - -;opcache.inherited_hack=1 -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. The file format is to add each filename -; to a new line. The filename may be a full path or just a file prefix -; (i.e., /var/www/x blacklists all the files and directories in /var/www -; that start with 'x'). Line starting with a ; are ignored (comments). -;opcache.blacklist_filename= - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -; Allows calling OPcache API functions only from PHP scripts which path is -; started from specified string. The default "" means no restriction -;opcache.restrict_api= - -; Mapping base of shared memory segments (for Windows only). All the PHP -; processes have to map shared memory into the same address space. This -; directive allows to manually fix the "Unable to reattach to base address" -; errors. -;opcache.mmap_base= - -; Enables and sets the second level cache directory. -; It should improve performance when SHM memory is full, at server restart or -; SHM reset. The default "" disables file based caching. -;opcache.file_cache= - -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - -; Enables or disables checksum validation when script loaded from file cache. -;opcache.file_cache_consistency_checks=1 - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -opcache.huge_code_pages=1 - -[curl] -; A default value for the CURLOPT_CAINFO option. This is required to be an -; absolute path. -;curl.cainfo = - -[openssl] -; The location of a Certificate Authority (CA) file on the local filesystem -; to use when verifying the identity of SSL/TLS peers. Most users should -; not specify a value for this directive as PHP will attempt to use the -; OS-managed cert stores in its absence. If specified, this value may still -; be overridden on a per-stream basis via the "cafile" SSL stream context -; option. -;openssl.cafile= - -; If openssl.cafile is not specified or if the CA file is not found, the -; directory pointed to by openssl.capath is searched for a suitable -; certificate. This value must be a correctly hashed certificate directory. -; Most users should not specify a value for this directive as PHP will -; attempt to use the OS-managed cert stores in its absence. If specified, -; this value may still be overridden on a per-stream basis via the "capath" -; SSL stream context option. -;openssl.capath= - -; Local Variables: -; tab-width: 4 -; End: - -[APC] -apc.shm_size = 32m -apc.enabled = 1 - -[xdebug] -xdebug.remote_enable = on diff --git a/images/php/fpm/ssmtp.conf b/images/php/fpm/ssmtp.conf deleted file mode 100644 index 1659e71b49..0000000000 --- a/images/php/fpm/ssmtp.conf +++ /dev/null @@ -1,4 +0,0 @@ -# ssmtp config (will be filled during entrypoint 50-ssmtp.sh) - -# Email 'From header's can override the default domain -FromLineOverride=yes diff --git a/images/postgres-ckan/90-datastore-user.sh b/images/postgres-ckan/90-datastore-user.sh deleted file mode 100755 index d12ea97269..0000000000 --- a/images/postgres-ckan/90-datastore-user.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL - CREATE USER ckan_datastore with encrypted password 'ckan'; - GRANT ALL PRIVILEGES ON DATABASE ckan TO ckan_datastore; -EOSQL diff --git a/images/postgres-ckan/Dockerfile b/images/postgres-ckan/Dockerfile deleted file mode 100644 index a20a80827b..0000000000 --- a/images/postgres-ckan/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/postgres - -# change log_min_error_statement and log_min_messages from `error` to `log` as drupal is prone to cause some errors which are all logged (yes `log` is a less verbose mode than `error`) -RUN sed -i "s/#log_min_error_statement = error/log_min_error_statement = log/" /usr/local/share/postgresql/postgresql.conf.sample \ - && sed -i "s/#log_min_messages = warning/log_min_messages = log/" /usr/local/share/postgresql/postgresql.conf.sample - -ENV POSTGRES_PASSWORD=ckan \ - POSTGRES_USER=ckan \ - POSTGRES_DB=ckan - -COPY 90-datastore-user.sh /docker-entrypoint-initdb.d/ diff --git a/images/postgres-drupal/Dockerfile b/images/postgres-drupal/Dockerfile deleted file mode 100644 index 2a01b4b630..0000000000 --- a/images/postgres-drupal/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/postgres - -# change log_min_error_statement and log_min_messages from `error` to `log` as drupal is prone to cause some errors which are all logged (yes `log` is a less verbose mode than `error`) -RUN sed -i "s/#log_min_error_statement = error/log_min_error_statement = log/" /usr/local/share/postgresql/postgresql.conf.sample \ - && sed -i "s/#log_min_messages = warning/log_min_messages = log/" /usr/local/share/postgresql/postgresql.conf.sample - -ENV POSTGRES_PASSWORD=drupal \ - POSTGRES_USER=drupal \ - POSTGRES_DB=drupal diff --git a/images/postgres/Dockerfile b/images/postgres/Dockerfile deleted file mode 100644 index 5601f06b8a..0000000000 --- a/images/postgres/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# alpine 3.11 from https://github.com/docker-library/postgres/blob/master/11/alpine/Dockerfile -FROM postgres:11.6-alpine - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV LAGOON=postgres - -COPY postgres-backup.sh /lagoon/ - -RUN echo -e "local all all md5\nhost all all 0.0.0.0/0 md5" >> /usr/local/share/postgresql/pg_hba.conf - -ENV PGUSER=postgres \ - POSTGRES_PASSWORD=lagoon \ - POSTGRES_USER=lagoon \ - POSTGRES_DB=lagoon \ - PGDATA=/var/lib/postgresql/data/pgdata - -# Postgresql entrypoint file needs bash, so start the entrypoints with bash -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["/usr/local/bin/docker-entrypoint.sh", "postgres"] \ No newline at end of file diff --git a/images/postgres/postgres-backup.sh b/images/postgres/postgres-backup.sh deleted file mode 100644 index f760fbcf3d..0000000000 --- a/images/postgres/postgres-backup.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -set -eu -o pipefail - -# directory to put the backup files -BACKUP_DIR=/var/lib/postgresql/data/backup - -# MYSQL Parameters -PGUSER=${POSTGRES_USER:-lagoon} -PGPASSWORD=${POSTGRES_PASSWORD:-lagoon} - -PGHOST=$1 - -# Number of days to keep backups -KEEP_BACKUPS_FOR=4 #days - -#============================================================================== -# METHODS -#============================================================================== - -# YYYY-MM-DD_HHMMSS -TIMESTAMP=$(date +%F_%H%M%S) - -function prepare() -{ - mkdir -p $BACKUP_DIR -} - -function delete_old_backups() -{ - echo "Deleting $BACKUP_DIR/*.sql.gz older than $KEEP_BACKUPS_FOR days" - find $BACKUP_DIR -type f -name "*.sql.gz" -mtime +$KEEP_BACKUPS_FOR -exec rm {} \; -} - - -function database_list() { - echo $(psql -At -c "select datname from pg_database where not datistemplate and datallowconn and datname != 'postgres';" postgres) -} - -function echo_status(){ - printf '\r'; - printf ' %0.s' {0..100} - printf '\r'; - printf "$1"'\r' -} - -function backup_database(){ - backup_file="$BACKUP_DIR/$TIMESTAMP.$database.sql.gz" - output="${output}${database} => $backup_file\n" - echo_status "...backing up $count of $total databases: $database" - $(pg_dump $database | gzip -9 > $backup_file) -} - -function backup_databases(){ - local databases=$(database_list) - local total=$(echo $databases | wc -w | xargs) - local output="" - local count=1 - for database in $databases; do - backup_database - local count=$((count+1)) - done - echo -ne $output -} - -function hr(){ - printf '=%.0s' {1..100} - printf "\n" -} - -#============================================================================== -# RUN SCRIPT -#============================================================================== -prepare -delete_old_backups -hr -backup_databases -hr -printf "All backed up!\n\n" diff --git a/images/python-ckan/Dockerfile b/images/python-ckan/Dockerfile deleted file mode 100644 index 74565bf25f..0000000000 --- a/images/python-ckan/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -ARG PYTHON_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/python:${PYTHON_VERSION} - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache git \ - libpq \ - postgresql-dev \ - gcc \ - musl-dev \ - file-dev \ - libxslt-dev \ - libxml2-dev \ - libffi-dev - -RUN mkdir -p /app/ckan/default \ - && fix-permissions /app/ckan/default - -RUN virtualenv --no-site-packages /app/ckan/default \ - && . /app/ckan/default/bin/activate \ - && pip install setuptools==20.4 diff --git a/images/python-ckandatapusher/Dockerfile b/images/python-ckandatapusher/Dockerfile deleted file mode 100644 index fe7f2a451d..0000000000 --- a/images/python-ckandatapusher/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -ARG PYTHON_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/python:${PYTHON_VERSION} - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache git \ - libpq \ - postgresql-dev \ - gcc \ - musl-dev \ - file-dev \ - libxslt-dev \ - libxml2-dev \ - libffi-dev \ - pcre-dev - -RUN virtualenv /app/ckan/datapusher - -RUN mkdir -p /app/ckan/datapusher/src \ - && mkdir -p /etc/ckan \ - && fix-permissions /app/ckan \ - && ln -s /app/ckan /usr/lib/ckan \ - && . /app/ckan/datapusher/bin/activate \ - && pip install uwsgi \ - && cd /app/ckan/datapusher/src \ - && git clone -b 0.0.14 https://github.com/ckan/datapusher.git \ - && cd datapusher \ - && /app/ckan/datapusher/bin/pip install -r requirements.txt \ - && /app/ckan/datapusher/bin/python setup.py develop \ - && cp deployment/datapusher.wsgi /etc/ckan/ \ - && cp deployment/datapusher_settings.py /etc/ckan/ - -ENV LISTEN_PORT=8800 - -CMD ["sh", "-c", ". /app/ckan/datapusher/bin/activate && uwsgi --http :${LISTEN_PORT} --wsgi-file /etc/ckan/datapusher.wsgi"] diff --git a/images/python/80-shell-timeout.sh b/images/python/80-shell-timeout.sh deleted file mode 100644 index fdc02f389e..0000000000 --- a/images/python/80-shell-timeout.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# If we are running within kubernetes, set a shell timeout of 10mins. -# We do that so old shells are closed and we can idle the cli container -if [ $KUBERNETES_PORT ]; then - TMOUT=600 -fi \ No newline at end of file diff --git a/images/python/Dockerfile b/images/python/Dockerfile deleted file mode 100644 index 1ee8d863f5..0000000000 --- a/images/python/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -ARG PYTHON_VERSION -ARG IMAGE_REPO -ARG ALPINE_VERSION -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=python - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk add --no-cache --virtual .build-deps \ - build-base \ - && pip install --upgrade pip \ - && pip install virtualenv==16.7.10 \ - && apk del .build-deps - -# Make sure shells are not running forever -COPY 80-shell-timeout.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["python"] diff --git a/images/rabbitmq/Dockerfile b/images/rabbitmq/Dockerfile index e936178fb5..4c5b86cc39 100644 --- a/images/rabbitmq/Dockerfile +++ b/images/rabbitmq/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons # alpine 3.11 as per https://github.com/docker-library/rabbitmq/blob/master/3.8/alpine/Dockerfile FROM rabbitmq:3.8-management-alpine diff --git a/images/redis-persistent/Dockerfile b/images/redis-persistent/Dockerfile deleted file mode 100644 index f83a77aee3..0000000000 --- a/images/redis-persistent/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/redis - -ENV FLAVOR=persistent diff --git a/images/redis/Dockerfile b/images/redis/Dockerfile deleted file mode 100644 index a6990f656c..0000000000 --- a/images/redis/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -ARG IMAGE_REPO -ARG ALPINE_VERSION -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM redis:5.0-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=redis -ENV FLAVOR=ephemeral - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -COPY conf /etc/redis/ -COPY docker-entrypoint /lagoon/entrypoints/70-redis-entrypoint - -RUN fix-permissions /etc/redis \ - fix-permissions /data - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["redis-server", "/etc/redis/redis.conf"] diff --git a/images/redis/conf/ephemeral.conf b/images/redis/conf/ephemeral.conf deleted file mode 100644 index 4840b8259f..0000000000 --- a/images/redis/conf/ephemeral.conf +++ /dev/null @@ -1,4 +0,0 @@ - -# this disabled the persistent cache -save "" -appendonly no diff --git a/images/redis/conf/persistent.conf b/images/redis/conf/persistent.conf deleted file mode 100644 index d3976a05f4..0000000000 --- a/images/redis/conf/persistent.conf +++ /dev/null @@ -1,17 +0,0 @@ -save 300 1 -save 60 100 - -appendonly yes -appendfsync everysec - -auto-aof-rewrite-percentage 100 -auto-aof-rewrite-min-size 64mb - -# RDB files created with checksum disabled have a checksum of zero that will -# tell the loading code to skip the check. -rdbchecksum yes - -# The filename where to dump the DB -dbfilename redis.rdb - -dir /data diff --git a/images/redis/conf/redis.conf b/images/redis/conf/redis.conf deleted file mode 100644 index 06425ea1c6..0000000000 --- a/images/redis/conf/redis.conf +++ /dev/null @@ -1,16 +0,0 @@ -# Redis 4.0 configuration file for non-persistent cache -# see https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf for all possible configs. - -loglevel ${LOGLEVEL:-notice} -databases ${DATABASES:-1} - -maxmemory ${MAXMEMORY:-100mb} -maxmemory-policy allkeys-lru - -# allow other hosts to connect to us -protected-mode no -bind 0.0.0.0 - -${REQUIREPASS_CONF:-} - -include /etc/redis/${FLAVOR:-ephemeral}.conf diff --git a/images/redis/docker-entrypoint b/images/redis/docker-entrypoint deleted file mode 100755 index fafbb758ef..0000000000 --- a/images/redis/docker-entrypoint +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -if [[ -n "${REDIS_PASSWORD}" ]]; then - export REQUIREPASS_CONF="# Enable basic/simple authentication -# Warning: since Redis is pretty fast an outside user can try up to -# 150k passwords per second against a good box. This means that you should -# use a very strong password otherwise it will be very easy to break. -requirepass ${REDIS_PASSWORD}" -fi - -ep /etc/redis/* - -exec "$@" diff --git a/images/solr-ckan/Dockerfile b/images/solr-ckan/Dockerfile deleted file mode 100644 index be3563bcd4..0000000000 --- a/images/solr-ckan/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG SOLR_MAJ_MIN_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/solr:${SOLR_MAJ_MIN_VERSION} -ARG SOLR_MAJ_MIN_VERSION - -COPY solr${SOLR_MAJ_MIN_VERSION} /solr-conf - -RUN precreate-core ckan /solr-conf - -CMD ["solr-foreground"] diff --git a/images/solr-ckan/solr5.5/conf/elevate.xml b/images/solr-ckan/solr5.5/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-ckan/solr5.5/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/mapping-ISOLatin1Accent.txt b/images/solr-ckan/solr5.5/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-ckan/solr5.5/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-ckan/solr5.5/conf/protwords.txt b/images/solr-ckan/solr5.5/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-ckan/solr5.5/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-ckan/solr5.5/conf/schema.xml b/images/solr-ckan/solr5.5/conf/schema.xml deleted file mode 100644 index 8e5018a2e2..0000000000 --- a/images/solr-ckan/solr5.5/conf/schema.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -index_id -text - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/solrconfig.xml b/images/solr-ckan/solr5.5/conf/solrconfig.xml deleted file mode 100644 index a0549e1146..0000000000 --- a/images/solr-ckan/solr5.5/conf/solrconfig.xml +++ /dev/null @@ -1,1800 +0,0 @@ - - - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_50} - - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - - - - - - - - - - - - - - - - 32 - - - - - - - - - - 4 - - - ${solr.lock.type:none} - - - - - - false - - - true - - - - - 1 - - 0 - - - - - - true - - - - - - - - - - - - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - 1024 - - - -1 - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - solr rocks010 - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - json - true - text - - - - - - - - {!xport} - xsort - false - - - - query - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.pinkPony.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - - - text - - - - - - - _src_ - - true - - - - - - - - - - - - - - - text - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - - - default - wordbreak - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - terms - - - - - - - string - elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - text/plain; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - *:* - - - - - - - - - - - - textSpell - - - - default - spell - spellchecker - true - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/solrconfig_extra.xml b/images/solr-ckan/solr5.5/conf/solrconfig_extra.xml deleted file mode 100644 index c5bc3acfb5..0000000000 --- a/images/solr-ckan/solr5.5/conf/solrconfig_extra.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - -textSpell - - - - - - default - spell - spellchecker - true - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/solrcore.properties b/images/solr-ckan/solr5.5/conf/solrcore.properties deleted file mode 100644 index 3a2433f676..0000000000 --- a/images/solr-ckan/solr5.5/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=5.0 -solr.pinkPony.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-ckan/solr5.5/conf/stopwords.txt b/images/solr-ckan/solr5.5/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-ckan/solr5.5/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-ckan/solr5.5/conf/synonyms.txt b/images/solr-ckan/solr5.5/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-ckan/solr5.5/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-ckan/solr6.6/conf/elevate.xml b/images/solr-ckan/solr6.6/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-ckan/solr6.6/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/mapping-ISOLatin1Accent.txt b/images/solr-ckan/solr6.6/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-ckan/solr6.6/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-ckan/solr6.6/conf/protwords.txt b/images/solr-ckan/solr6.6/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-ckan/solr6.6/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-ckan/solr6.6/conf/schema.xml b/images/solr-ckan/solr6.6/conf/schema.xml deleted file mode 100644 index 8e5018a2e2..0000000000 --- a/images/solr-ckan/solr6.6/conf/schema.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -index_id -text - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/solrconfig.xml b/images/solr-ckan/solr6.6/conf/solrconfig.xml deleted file mode 100644 index 12f7fb9966..0000000000 --- a/images/solr-ckan/solr6.6/conf/solrconfig.xml +++ /dev/null @@ -1,1494 +0,0 @@ - - - -]> - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_60} - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - ${solr.hdfs.home:} - - ${solr.hdfs.confdir:} - - ${solr.hdfs.blockcache.enabled:true} - - ${solr.hdfs.blockcache.global:true} - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - ${solr.lock.type:none} - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - false - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - - - - - - - - 1024 - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - static firstSearcher warming in solrconfig.xml - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.selectSearchHandler.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - explicit - json - true - text - - - - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - text - - - - - - - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - &spellcheck; - - - - - spell - - default - wordbreak - on - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - text - true - - - tvComponent - - - - - - - - - - true - false - - - terms - - - - - - - false - false - - false - - true - false - - 1 - - - terms - spellcheck - - - - - - - string - elevate.xml - - - - - - explicit - text - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - application/json; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/solrconfig_spellcheck.xml b/images/solr-ckan/solr6.6/conf/solrconfig_spellcheck.xml deleted file mode 100644 index 5c9d7ad79e..0000000000 --- a/images/solr-ckan/solr6.6/conf/solrconfig_spellcheck.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - textSpell - - - - - - - default - spell - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - wordbreak - solr.WordBreakSolrSpellChecker - name - true - true - 10 - - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/solrcore.properties b/images/solr-ckan/solr6.6/conf/solrcore.properties deleted file mode 100644 index d7d045b0fd..0000000000 --- a/images/solr-ckan/solr6.6/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=6.0 -solr.selectSearchHandler.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-ckan/solr6.6/conf/stopwords.txt b/images/solr-ckan/solr6.6/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-ckan/solr6.6/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-ckan/solr6.6/conf/synonyms.txt b/images/solr-ckan/solr6.6/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-ckan/solr6.6/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/Dockerfile b/images/solr-drupal/Dockerfile deleted file mode 100644 index 0de192e938..0000000000 --- a/images/solr-drupal/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG SOLR_MAJ_MIN_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/solr:${SOLR_MAJ_MIN_VERSION} -ARG SOLR_MAJ_MIN_VERSION - -COPY solr${SOLR_MAJ_MIN_VERSION} /solr-conf - -RUN precreate-core drupal /solr-conf - -CMD ["solr-foreground"] diff --git a/images/solr-drupal/solr5.5/conf/elevate.xml b/images/solr-drupal/solr5.5/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-drupal/solr5.5/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/mapping-ISOLatin1Accent.txt b/images/solr-drupal/solr5.5/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-drupal/solr5.5/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-drupal/solr5.5/conf/protwords.txt b/images/solr-drupal/solr5.5/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-drupal/solr5.5/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-drupal/solr5.5/conf/schema.xml b/images/solr-drupal/solr5.5/conf/schema.xml deleted file mode 100644 index 692e3be1ad..0000000000 --- a/images/solr-drupal/solr5.5/conf/schema.xml +++ /dev/null @@ -1,744 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/schema_extra_fields.xml b/images/solr-drupal/solr5.5/conf/schema_extra_fields.xml deleted file mode 100644 index 02b365551c..0000000000 --- a/images/solr-drupal/solr5.5/conf/schema_extra_fields.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - diff --git a/images/solr-drupal/solr5.5/conf/schema_extra_types.xml b/images/solr-drupal/solr5.5/conf/schema_extra_types.xml deleted file mode 100644 index bd716b82ac..0000000000 --- a/images/solr-drupal/solr5.5/conf/schema_extra_types.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - diff --git a/images/solr-drupal/solr5.5/conf/solrconfig.xml b/images/solr-drupal/solr5.5/conf/solrconfig.xml deleted file mode 100644 index 2ccb268e43..0000000000 --- a/images/solr-drupal/solr5.5/conf/solrconfig.xml +++ /dev/null @@ -1,1800 +0,0 @@ - - - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_50} - - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - - - - - - - - - - - - - - - - 32 - - - - - - - - - - 4 - - - ${solr.lock.type:none} - - - - - - false - - - true - - - - - 1 - - 0 - - - - - - true - - - - - - - - - - - - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - 1024 - - - -1 - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - solr rocks010 - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - json - true - text - - - - - - - - {!xport} - xsort - false - - - - query - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.pinkPony.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - - - text - - - - - - - _src_ - - true - - - - - - - - - - - - - - - text - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - - - default - wordbreak - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - terms - - - - - - - string - elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - text/plain; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - *:* - - - - - - - - - - - - textSpell - - - - default - spell - spellchecker - true - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/solrconfig_extra.xml b/images/solr-drupal/solr5.5/conf/solrconfig_extra.xml deleted file mode 100644 index c5bc3acfb5..0000000000 --- a/images/solr-drupal/solr5.5/conf/solrconfig_extra.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - -textSpell - - - - - - default - spell - spellchecker - true - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/solrcore.properties b/images/solr-drupal/solr5.5/conf/solrcore.properties deleted file mode 100644 index 3a2433f676..0000000000 --- a/images/solr-drupal/solr5.5/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=5.0 -solr.pinkPony.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-drupal/solr5.5/conf/stopwords.txt b/images/solr-drupal/solr5.5/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-drupal/solr5.5/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr5.5/conf/synonyms.txt b/images/solr-drupal/solr5.5/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-drupal/solr5.5/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr6.6/conf/elevate.xml b/images/solr-drupal/solr6.6/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-drupal/solr6.6/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/mapping-ISOLatin1Accent.txt b/images/solr-drupal/solr6.6/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-drupal/solr6.6/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-drupal/solr6.6/conf/protwords.txt b/images/solr-drupal/solr6.6/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-drupal/solr6.6/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-drupal/solr6.6/conf/schema.xml b/images/solr-drupal/solr6.6/conf/schema.xml deleted file mode 100644 index 7374d6d8b6..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema.xml +++ /dev/null @@ -1,843 +0,0 @@ - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &extrafields; - - - - - - &extratypes; - - - - - - id - - - - - diff --git a/images/solr-drupal/solr6.6/conf/schema_extra_fields.xml b/images/solr-drupal/solr6.6/conf/schema_extra_fields.xml deleted file mode 100644 index 8933702d26..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_extra_fields.xml +++ /dev/null @@ -1,21 +0,0 @@ - - diff --git a/images/solr-drupal/solr6.6/conf/schema_extra_types.xml b/images/solr-drupal/solr6.6/conf/schema_extra_types.xml deleted file mode 100644 index ce2ce0cb35..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_extra_types.xml +++ /dev/null @@ -1,32 +0,0 @@ - - diff --git a/images/solr-drupal/solr6.6/conf/schema_legacy_fields.xml b/images/solr-drupal/solr6.6/conf/schema_legacy_fields.xml deleted file mode 100644 index 902bb28e75..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_legacy_fields.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/schema_legacy_types.xml b/images/solr-drupal/solr6.6/conf/schema_legacy_types.xml deleted file mode 100644 index b46da0485e..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_legacy_types.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/images/solr-drupal/solr6.6/conf/solrconfig.xml b/images/solr-drupal/solr6.6/conf/solrconfig.xml deleted file mode 100644 index 0ed1eb55e1..0000000000 --- a/images/solr-drupal/solr6.6/conf/solrconfig.xml +++ /dev/null @@ -1,1494 +0,0 @@ - - - -]> - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_60} - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - ${solr.hdfs.home:} - - ${solr.hdfs.confdir:} - - ${solr.hdfs.blockcache.enabled:true} - - ${solr.hdfs.blockcache.global:true} - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - ${solr.lock.type:none} - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - false - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - - - - - - - - 1024 - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - static firstSearcher warming in solrconfig.xml - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.selectSearchHandler.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - explicit - json - true - text - - - - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - text - - - - - - - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - &spellcheck; - - - - - spell - - default - wordbreak - on - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - text - true - - - tvComponent - - - - - - - - - - true - false - - - terms - - - - - - - false - false - - false - - true - false - - 1 - - - terms - spellcheck - - - - - - - string - elevate.xml - - - - - - explicit - text - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - application/json; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/solrconfig_spellcheck.xml b/images/solr-drupal/solr6.6/conf/solrconfig_spellcheck.xml deleted file mode 100644 index 5c9d7ad79e..0000000000 --- a/images/solr-drupal/solr6.6/conf/solrconfig_spellcheck.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - textSpell - - - - - - - default - spell - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - wordbreak - solr.WordBreakSolrSpellChecker - name - true - true - 10 - - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/solrcore.properties b/images/solr-drupal/solr6.6/conf/solrcore.properties deleted file mode 100644 index d7d045b0fd..0000000000 --- a/images/solr-drupal/solr6.6/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=6.0 -solr.selectSearchHandler.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-drupal/solr6.6/conf/stopwords.txt b/images/solr-drupal/solr6.6/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-drupal/solr6.6/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr6.6/conf/synonyms.txt b/images/solr-drupal/solr6.6/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-drupal/solr6.6/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr7.7/conf/accents_en.txt b/images/solr-drupal/solr7.7/conf/accents_en.txt deleted file mode 100644 index bed051477b..0000000000 --- a/images/solr-drupal/solr7.7/conf/accents_en.txt +++ /dev/null @@ -1,164 +0,0 @@ -# À => A -"\u00C0" => "A" -# Á => A -"\u00C1" => "A" -#  => A -"\u00C2" => "A" -# à => A -"\u00C3" => "A" -# Ä => A -"\u00C4" => "A" -# Å => A -"\u00C5" => "A" -# Ą => A -"\u0104" => "A" -# Æ => AE -"\u00C6" => "AE" -# Ç => C -"\u00C7" => "C" -# Ć => C -"\U0106" => "C" -# È => E -"\u00C8" => "E" -# É => E -"\u00C9" => "E" -# Ê => E -"\u00CA" => "E" -# Ë => E -"\u00CB" => "E" -# Ę => E -"\u0118" => "E" -# Ì => I -"\u00CC" => "I" -# Í => I -"\u00CD" => "I" -# Î => I -"\u00CE" => "I" -# Ï => I -"\u00CF" => "I" -# IJ => IJ -"\u0132" => "IJ" -# Ð => D -"\u00D0" => "D" -# Ł => L -"\u0141" => "L" -# Ñ => N -"\u00D1" => "N" -# Ń => N -"\u0143" => "N" -# Ò => O -"\u00D2" => "O" -# Ó => O -"\u00D3" => "O" -# Ô => O -"\u00D4" => "O" -# Õ => O -"\u00D5" => "O" -# Ö => O -"\u00D6" => "O" -# Ø => O -"\u00D8" => "O" -# Œ => OE -"\u0152" => "OE" -# Þ -"\u00DE" => "TH" -# Ù => U -"\u00D9" => "U" -# Ú => U -"\u00DA" => "U" -# Û => U -"\u00DB" => "U" -# Ü => U -"\u00DC" => "U" -# Ý => Y -"\u00DD" => "Y" -# Ÿ => Y -"\u0178" => "Y" -# à => a -"\u00E0" => "a" -# á => a -"\u00E1" => "a" -# â => a -"\u00E2" => "a" -# ã => a -"\u00E3" => "a" -# ä => a -"\u00E4" => "a" -# å => a -"\u00E5" => "a" -# æ => ae -"\u00E6" => "ae" -# ç => c -"\u00E7" => "c" -# è => e -"\u00E8" => "e" -# é => e -"\u00E9" => "e" -# ê => e -"\u00EA" => "e" -# ë => e -"\u00EB" => "e" -# ì => i -"\u00EC" => "i" -# í => i -"\u00ED" => "i" -# î => i -"\u00EE" => "i" -# ï => i -"\u00EF" => "i" -# ij => ij -"\u0133" => "ij" -# ð => d -"\u00F0" => "d" -# ñ => n -"\u00F1" => "n" -# ò => o -"\u00F2" => "o" -# ó => o -"\u00F3" => "o" -# ô => o -"\u00F4" => "o" -# õ => o -"\u00F5" => "o" -# ö => o -"\u00F6" => "o" -# ø => o -"\u00F8" => "o" -# œ => oe -"\u0153" => "oe" -# ß => ss -"\u00DF" => "ss" -# Ś => S -"\u015a" => "S" -# þ => th -"\u00FE" => "th" -# ù => u -"\u00F9" => "u" -# ú => u -"\u00FA" => "u" -# û => u -"\u00FB" => "u" -# ü => u -"\u00FC" => "u" -# ý => y -"\u00FD" => "y" -# ÿ => y -"\u00FF" => "y" -# Ź => Z -"\u0179" => "Z" -# Ż => Z -"\u017b" => "Z" -# ff => ff -"\uFB00" => "ff" -# fi => fi -"\uFB01" => "fi" -# fl => fl -"\uFB02" => "fl" -# ffi => ffi -"\uFB03" => "ffi" -# ffl => ffl -"\uFB04" => "ffl" -# ſt => st -"\uFB05" => "st" -# st => st -"\uFB06" => "st" diff --git a/images/solr-drupal/solr7.7/conf/accents_und.txt b/images/solr-drupal/solr7.7/conf/accents_und.txt deleted file mode 100644 index 7c883f87a3..0000000000 --- a/images/solr-drupal/solr7.7/conf/accents_und.txt +++ /dev/null @@ -1,148 +0,0 @@ -# À => A -"\u00C0" => "A" -# Á => A -"\u00C1" => "A" -#  => A -"\u00C2" => "A" -# à => A -"\u00C3" => "A" -# Ä => A -"\u00C4" => "A" -# Å => A -"\u00C5" => "A" -# Æ => AE -"\u00C6" => "AE" -# Ç => C -"\u00C7" => "C" -# È => E -"\u00C8" => "E" -# É => E -"\u00C9" => "E" -# Ê => E -"\u00CA" => "E" -# Ë => E -"\u00CB" => "E" -# Ì => I -"\u00CC" => "I" -# Í => I -"\u00CD" => "I" -# Î => I -"\u00CE" => "I" -# Ï => I -"\u00CF" => "I" -# IJ => IJ -"\u0132" => "IJ" -# Ð => D -"\u00D0" => "D" -# Ñ => N -"\u00D1" => "N" -# Ò => O -"\u00D2" => "O" -# Ó => O -"\u00D3" => "O" -# Ô => O -"\u00D4" => "O" -# Õ => O -"\u00D5" => "O" -# Ö => O -"\u00D6" => "O" -# Ø => O -"\u00D8" => "O" -# Œ => OE -"\u0152" => "OE" -# Þ -"\u00DE" => "TH" -# Ù => U -"\u00D9" => "U" -# Ú => U -"\u00DA" => "U" -# Û => U -"\u00DB" => "U" -# Ü => U -"\u00DC" => "U" -# Ý => Y -"\u00DD" => "Y" -# Ÿ => Y -"\u0178" => "Y" -# à => a -"\u00E0" => "a" -# á => a -"\u00E1" => "a" -# â => a -"\u00E2" => "a" -# ã => a -"\u00E3" => "a" -# ä => a -"\u00E4" => "a" -# å => a -"\u00E5" => "a" -# æ => ae -"\u00E6" => "ae" -# ç => c -"\u00E7" => "c" -# è => e -"\u00E8" => "e" -# é => e -"\u00E9" => "e" -# ê => e -"\u00EA" => "e" -# ë => e -"\u00EB" => "e" -# ì => i -"\u00EC" => "i" -# í => i -"\u00ED" => "i" -# î => i -"\u00EE" => "i" -# ï => i -"\u00EF" => "i" -# ij => ij -"\u0133" => "ij" -# ð => d -"\u00F0" => "d" -# ñ => n -"\u00F1" => "n" -# ò => o -"\u00F2" => "o" -# ó => o -"\u00F3" => "o" -# ô => o -"\u00F4" => "o" -# õ => o -"\u00F5" => "o" -# ö => o -"\u00F6" => "o" -# ø => o -"\u00F8" => "o" -# œ => oe -"\u0153" => "oe" -# ß => ss -"\u00DF" => "ss" -# þ => th -"\u00FE" => "th" -# ù => u -"\u00F9" => "u" -# ú => u -"\u00FA" => "u" -# û => u -"\u00FB" => "u" -# ü => u -"\u00FC" => "u" -# ý => y -"\u00FD" => "y" -# ÿ => y -"\u00FF" => "y" -# ff => ff -"\uFB00" => "ff" -# fi => fi -"\uFB01" => "fi" -# fl => fl -"\uFB02" => "fl" -# ffi => ffi -"\uFB03" => "ffi" -# ffl => ffl -"\uFB04" => "ffl" -# ſt => st -"\uFB05" => "st" -# st => st -"\uFB06" => "st" diff --git a/images/solr-drupal/solr7.7/conf/elevate.xml b/images/solr-drupal/solr7.7/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-drupal/solr7.7/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/protwords_en.txt b/images/solr-drupal/solr7.7/conf/protwords_en.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/images/solr-drupal/solr7.7/conf/protwords_en.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/solr-drupal/solr7.7/conf/protwords_und.txt b/images/solr-drupal/solr7.7/conf/protwords_und.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/images/solr-drupal/solr7.7/conf/protwords_und.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/solr-drupal/solr7.7/conf/schema.xml b/images/solr-drupal/solr7.7/conf/schema.xml deleted file mode 100644 index b643a91ee7..0000000000 --- a/images/solr-drupal/solr7.7/conf/schema.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &extrafields; - - - &extratypes; - - - id - - - - - diff --git a/images/solr-drupal/solr7.7/conf/schema_extra_fields.xml b/images/solr-drupal/solr7.7/conf/schema_extra_fields.xml deleted file mode 100644 index f5d74188a5..0000000000 --- a/images/solr-drupal/solr7.7/conf/schema_extra_fields.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/schema_extra_types.xml b/images/solr-drupal/solr7.7/conf/schema_extra_types.xml deleted file mode 100644 index 8b5e82f035..0000000000 --- a/images/solr-drupal/solr7.7/conf/schema_extra_types.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/solrconfig.xml b/images/solr-drupal/solr7.7/conf/solrconfig.xml deleted file mode 100644 index 38ff72e62d..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig.xml +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - -]> - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_70} - - - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - ${solr.hdfs.home:} - - ${solr.hdfs.confdir:} - - ${solr.hdfs.blockcache.enabled:true} - - ${solr.hdfs.blockcache.global:true} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.lock.type:none} - - - - - - - - - - - - - true - - - &index; - - - - - - - - - ${solr.ulog.dir:} - - - - - ${solr.autoCommit.MaxDocs:-1} - ${solr.autoCommit.MaxTime:15000} - false - - - - - - ${solr.autoSoftCommit.MaxDocs:-1} - ${solr.autoSoftCommit.MaxTime:-1} - - - - - - - - - - - - - - - - &query; - - - - - - - - - - - - static firstSearcher warming in solrconfig.xml - - - - - - false - - - - - - - - - &requestdispatcher; - - - - - - - &extra; - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_extra.xml b/images/solr-drupal/solr7.7/conf/solrconfig_extra.xml deleted file mode 100644 index 1a59c45938..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig_extra.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - en - spellcheck_en - solr.DirectSolrSpellChecker - internal - 0.5 - 2 - 1 - 5 - 4 - 0.01 - .01 - true - - - - und - spellcheck_und - solr.DirectSolrSpellChecker - internal - 0.5 - 2 - 1 - 5 - 4 - 0.01 - .01 - true - - - - - en - AnalyzingInfixLookupFactory - DocumentDictionaryFactory - twm_suggest - text_en - sm_context_tags - true - false - - - - und - AnalyzingInfixLookupFactory - DocumentDictionaryFactory - twm_suggest - text_und - sm_context_tags - true - false - - - - - - false - false - false - true - false - 1 - false - 10 - - - terms - spellcheck - suggest - - - - - - - true - ignored_ - true - links - ignored_ - - - - - - - 1 - 1 - false - ${solr.mlt.timeAllowed:2000} - - - - - - - lucene - id - explicit - true - ${solr.selectSearchHandler.timeAllowed:-1} - false - - - spellcheck - elevator - - - - - - - id - und - on - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - true - und - 10 - - - suggest - - - - - - - id - true - - - tvComponent - - - - - - string - elevate.xml - - - diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_index.xml b/images/solr-drupal/solr7.7/conf/solrconfig_index.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_query.xml b/images/solr-drupal/solr7.7/conf/solrconfig_query.xml deleted file mode 100644 index 5bdd696902..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig_query.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - true - - false - - 20 - 200 - 1024 diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_requestdispatcher.xml b/images/solr-drupal/solr7.7/conf/solrconfig_requestdispatcher.xml deleted file mode 100644 index 3a3f17d1c9..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig_requestdispatcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/images/solr-drupal/solr7.7/conf/solrcore.properties b/images/solr-drupal/solr7.7/conf/solrcore.properties deleted file mode 100644 index c75ec4d7ff..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrcore.properties +++ /dev/null @@ -1,13 +0,0 @@ -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://solr:8983/solr -solr.replication.confFiles=schema.xml,schema_extra_types.xml,schema_extra_fields.xml,elevate.xml,stopwords_en.txt,synonyms_en.txt,protwords_en.txt,accents_en.txt,stopwords_und.txt,synonyms_und.txt,protwords_und.txt,accents_und.txt -solr.mlt.timeAllowed=2000 -solr.luceneMatchVersion=7.7 -solr.selectSearchHandler.timeAllowed=-1 -solr.autoCommit.MaxDocs=-1 -solr.autoCommit.MaxTime=15000 -solr.autoSoftCommit.MaxDocs=-1 -solr.autoSoftCommit.MaxTime=-1 -solr.install.dir=/opt/solr diff --git a/images/solr-drupal/solr7.7/conf/stopwords_en.txt b/images/solr-drupal/solr7.7/conf/stopwords_en.txt deleted file mode 100644 index 6981050710..0000000000 --- a/images/solr-drupal/solr7.7/conf/stopwords_en.txt +++ /dev/null @@ -1,35 +0,0 @@ -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with diff --git a/images/solr-drupal/solr7.7/conf/stopwords_und.txt b/images/solr-drupal/solr7.7/conf/stopwords_und.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/images/solr-drupal/solr7.7/conf/stopwords_und.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/solr-drupal/solr7.7/conf/synonyms_en.txt b/images/solr-drupal/solr7.7/conf/synonyms_en.txt deleted file mode 100644 index 91689ff92f..0000000000 --- a/images/solr-drupal/solr7.7/conf/synonyms_en.txt +++ /dev/null @@ -1 +0,0 @@ -drupal, durpal diff --git a/images/solr-drupal/solr7.7/conf/synonyms_und.txt b/images/solr-drupal/solr7.7/conf/synonyms_und.txt deleted file mode 100644 index 91689ff92f..0000000000 --- a/images/solr-drupal/solr7.7/conf/synonyms_und.txt +++ /dev/null @@ -1 +0,0 @@ -drupal, durpal diff --git a/images/solr/10-solr-port.sh b/images/solr/10-solr-port.sh deleted file mode 100755 index a7c8ef3feb..0000000000 --- a/images/solr/10-solr-port.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# SOLR is capable of having it's own port overwritten via SOLR_PORT, but on kubernetes this env variable is filled with -# SOLR_PORT=tcp://172.30.32.255:8983, so we check if the env variable is an actual port only and if not we use the default port -# Inspired from: https://github.com/docker-solr/docker-solr/blob/6d7fa219c3b3407e0dd29fb17b15ec9e6df85058/6.6/alpine/scripts/docker-entrypoint.sh#L11-L13 -if [[ -n "$SOLR_PORT" ]] && ! /bin/bash -c "grep -E -q '^[0-9]+$' <<<\"${SOLR_PORT:-}\""; then - SOLR_PORT=8983 - export SOLR_PORT -fi \ No newline at end of file diff --git a/images/solr/20-solr-datadir.sh b/images/solr/20-solr-datadir.sh deleted file mode 100755 index d7c1f486cc..0000000000 --- a/images/solr/20-solr-datadir.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/sh -set -eo pipefail - -# check if SOLR_COPY_DATA_DIR_SOURCE is set, if yes we're coping the contents of the given folder into the data dir folder -# this allows to prefill the datadir with a provided datadir (either added in a Dockerfile build, or mounted into the running container). -# This is different than just setting $SOLR_DATA_DIR to the source folder, as only /var/solr is a persistent folder, so setting -# $SOLR_DATA_DIR to another folder will make solr to not store the datadir across container restarts, while with this copy system -# the data will be prefilled and persistent across container restarts. -if [ -n "$SOLR_COPY_DATA_DIR_SOURCE" ]; then - echo "MARIADB_COPY_DATA_DIR_SOURCE is set, start copying from source location" - for solrcorepath in $(ls -d $SOLR_COPY_DATA_DIR_SOURCE/*/ | grep -v lost+found) ; do - corename=$(basename $solrcorepath) - if [ -d ${SOLR_DATA_DIR:-/var/solr}/$corename ]; then - echo "core $corename already present in destination, skipping copying" - else - echo "copying datadir contents from '$SOLR_COPY_DATA_DIR_SOURCE/$corename to '${SOLR_DATA_DIR:-/var/solr}/$corename'" - CUR_DIR=${PWD} - mkdir ${SOLR_DATA_DIR:-/var/solr}/$corename - cd $SOLR_COPY_DATA_DIR_SOURCE/$corename; tar cf - . | (cd ${SOLR_DATA_DIR:-/var/solr}/$corename; tar xvf -) - cd $CUR_DIR - fi - done -fi - -# Previously the Solr Config and Solr Data Dir was both kept in the persistent volume: -# - Solr data: /opt/solr/server/solr/mycores/${corename}/data -# - Solr config: /opt/solr/server/solr/mycores/${corename}/config -# - Persistent Volume: /opt/solr/server/solr/mycores/ -# The Solr Config was copied from the Docker Image into the Solr Config directory on the very first time solr started. -# This had the problem that if a new Solr Config was shipped in a new Docker Iamage the config was not copied again. -# Therefore there was no possibility to ship with updated configs and also the system does not follow any other -# services like nginx or php which have their configs not existing in persistent volumes and insted in Docker Images. -# The following script migrates from to the new directory structure: -# - Solr data: /var/solr/${corename} -# - Solr config: /opt/solr/server/solr/mycores/${corename}/config -# - Persistent Volume: /var/solr/ -# It does: -# 1. Move folders from /var/solr/${corename}/data to /var/solr/${corename} - this is needed if the existing persistent volume is -# mounted now to /var/solr/ but the data is still within data/ -# 2. Create the folder /opt/solr/server/solr/mycores/${corename} if not existing (because there is no persistent volume mounted anymore) -# and copy the config from the persistent storage to that folder. - -# It then also tries to update existing non-compatible configs inside solrconfig.xml: -# - dataDir now needs to be `/var/solr/${solr.core.name}` to point to the new persistent Volume -# - lockType needs to be `${solr.lock.type:none}` to prevent issues with the default file based Lock system which -# can cause issues if the solr is not stopped correctly -# The script does that for existing configs in `/opt/solr/server/solr/mycores/${corename}/config` if that folder exists which can be on two cases: -# 1. During a docker build the solr core has already been created via `precreate-core` (which should be used now all the time) -# 2. The first part of the script has copied the config from the previous persistent volume into these folders -# If `/opt/solr/server/solr/mycores` is empty, this means the container has never been started, had no previous persistent volume and also did not -# run `precreate-core` yet, it checks if the common used folder `/solr-conf/conf/` has a config in it and tries to adapt it. -# This probably fails because of permissions issues, it will throw an error and exit. - -if [ ! -n "$(ls /opt/solr/server/solr/mycores)" ]; then - echo 'No pre-created Solr Cores found in `/opt/solr/server/solr/mycores` this probably means that your Dockerfile does not run' - echo ' RUN precreate-core corename /solr-conf' - echo 'within Dockerfile and instead uses' - echo ' CMD ["solr-precreate", "corename", "/solr-conf"]' - echo 'Please update your Dockerfile to:' - echo ' RUN precreate-core corename /solr-conf' - echo ' CMD ["solr-foreground"]' - printf "\n\n" -fi - -if [ -n "$(ls ${SOLR_DATA_DIR:-/var/solr})" ]; then - # Iterate through all existing solr cores - for solrcorepath in $(ls -d ${SOLR_DATA_DIR:-/var/solr}/*/ | grep -v lost+found) ; do - corename=$(basename $solrcorepath) - if [ -d ${solrcorepath}data ]; then - echo "${solrcorepath} has it's data in deprecated location ${solrcorepath}data, moving to ${solrcorepath}." - # moving the contents of /var/solr/${corename}/data to /var/solr/${corename} - # the datadir now has the layout that a newly created core would. - mv ${solrcorepath}data/* ${solrcorepath} - # remove empty directory - rm -Rf ${solrcorepath}data || mv ${solrcorepath}data ${solrcorepath}data-delete - fi - - # If the core has no files in /opt/solr/server/solr/mycores/${corename} this means: - # The Docker Image did not run `precreate-core corename /solr-conf` during the Dockerfile - # and instead is running `solr-precreate corname solr-conf` as CMD of the container. - # But we already have an existing solr config from the persistent storage, we copy that over - if [ ! -d /opt/solr/server/solr/mycores/${corename} ]; then - mkdir -p /opt/solr/server/solr/mycores/${corename} - # Copy the solr config from the persistent volume in the solr home config directory - cp -R ${solrcorepath}conf /opt/solr/server/solr/mycores/${corename}/ - echo "copied pre-existing solr config from '${solrcorepath}conf' to '/opt/solr/server/solr/mycores/${corename}/conf'" - printf "\n\n" - # there must be a core.properties to be recognized as a core - touch /opt/solr/server/solr/mycores/${corename}/core.properties - fi - done -fi - -function fixConfig { - fail=0 - if cat $1/solrconfig.xml | grep dataDir | grep -qv "${SOLR_DATA_DIR:-/var/solr}/\${solr.core.name}"; then - echo "Found old non lagoon compatible dataDir config in solrconfig.xml:" - cat $1/solrconfig.xml | grep dataDir - SOLR_DATA_DIR=${SOLR_DATA_DIR:-/var/solr} - SOLR_DATA_DIR_ESCAPED=${SOLR_DATA_DIR//\//\\/} # escapig the forward slashes with backslahes - if [ -w $1/ ]; then - sed -ibak "s/.*/$SOLR_DATA_DIR_ESCAPED\/\${solr.core.name}<\/dataDir>/" $1/solrconfig.xml - echo "automagically updated to compatible config: " - echo " ${SOLR_DATA_DIR:-/var/solr}/\${solr.core.name}" - echo "Please update your solrconfig.xml to make this persistent." - else - echo "but no write permission to automagically change to compatible config: " - echo " ${SOLR_DATA_DIR:-/var/solr}/\${solr.core.name}" - echo "Please update your solrconfig.xml and commit again." - fail=1 - fi - printf "\n\n" - fi - # change lockType to none - if cat $1/solrconfig.xml | grep lockType | grep -qv '${solr.lock.type:none}'; then - echo "Found old non lagoon compatible lockType config in solrconfig.xml:" - cat $1/solrconfig.xml | grep lockType - if [ -w $1/ ]; then - sed -ibak 's/\${solr\.lock\.type:native}<\/lockType>/${solr.lock.type:none}<\/lockType>/' $1/solrconfig.xml - echo "automagically updated to compatible config: " - echo ' ${solr.lock.type:none}' - echo "Please update your solrconfig.xml to make this persistent." - else - echo "but no write permission to automagically change to compatible config: " - echo ' ${solr.lock.type:none}' - echo "Please update your solrconfig.xml and commit again." - fail=1 - fi - printf "\n\n" - fi - if [ "$fail" == "1" ]; then - exit 1; - fi -} - -# check if `/opt/solr/server/solr/mycores` has cores, which means that `precreate-core` has already be called so we check the configs there -if [ -n "$(ls /opt/solr/server/solr/mycores)" ]; then - # Iterate through all solr cores - for solrcorepath in $(ls -d /opt/solr/server/solr/mycores/*/) ; do - corename=$(basename $solrcorepath) - # Check and Update the solr config with lagoon compatible config - if [ -f /opt/solr/server/solr/mycores/${corename}/conf/solrconfig.xml ]; then - fixConfig /opt/solr/server/solr/mycores/${corename}/conf - fi - done -else - # `/opt/solr/server/solr/mycores` is empty, meaning that no `precreate-core` has been called and probably this container is started via `solr-precreate - # We try to update the solr configs within `/solr-conf/conf` to the new lagoon default config as this one will most probably be used to create a new core - if [ -f /solr-conf/conf/solrconfig.xml ]; then - fixConfig /solr-conf/conf - else - echo "No config found in '/solr-conf/conf' and was not able to automatically update solr config to newest lagoon compatible version." - echo "Cannot guarantee if this Solr config will work!" - fi -fi - diff --git a/images/solr/Dockerfile b/images/solr/Dockerfile deleted file mode 100644 index 2ad030949d..0000000000 --- a/images/solr/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -ARG SOLR_MAJ_MIN_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM solr:${SOLR_MAJ_MIN_VERSION}-alpine - -LABEL maintainer="amazee.io" -ENV LAGOON=solr - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home/.bashrc /home/.bashrc - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -# we need root for the fix-permissions to work -USER root - -RUN mkdir -p /var/solr -RUN fix-permissions /var/solr \ - && chown solr:solr /var/solr \ - && fix-permissions /opt/solr/server/logs \ - && fix-permissions /opt/solr/server/solr - - -# solr really doesn't like to be run as root, so we define the default user agin -USER solr - -COPY 10-solr-port.sh /lagoon/entrypoints/ -COPY 20-solr-datadir.sh /lagoon/entrypoints/ - - -# Define Volume so locally we get persistent cores -VOLUME /var/solr - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] - -CMD ["solr-precreate", "mycore"] diff --git a/images/toolbox/Dockerfile b/images/toolbox/Dockerfile deleted file mode 100644 index 40c59f9400..0000000000 --- a/images/toolbox/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG IMAGE_REPO - -FROM ${IMAGE_REPO:-lagoon}/mariadb as mariadb - -FROM ${IMAGE_REPO:-lagoon}/commons as commons - -LABEL maintainer="amazee.io" - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache curl ncdu socat ca-certificates openssl perl perl-doc mysql-client rsync mariadb-mytop \ - && update-ca-certificates \ - && rm -rf /var/cache/apk/* \ - && wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl -O mysqltuner.pl \ - && chmod +x mysqltuner.pl - -COPY --from=mariadb /usr/bin/my_print_defaults /usr/bin/my_print_defaults diff --git a/images/toolbox/README.md b/images/toolbox/README.md deleted file mode 100644 index b24d70062b..0000000000 --- a/images/toolbox/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Lagoon Toolbox Container - -Container that comes with following tools that might get handy for daily operations: -- curl -- mysql-client -- ncdu -- openssl -- socat \ No newline at end of file diff --git a/images/varnish-drupal/Dockerfile b/images/varnish-drupal/Dockerfile deleted file mode 100644 index 100ebedad0..0000000000 --- a/images/varnish-drupal/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/varnish - -COPY drupal.vcl /etc/varnish/default.vcl - -RUN fix-permissions /etc/varnish/default.vcl diff --git a/images/varnish-drupal/drupal.vcl b/images/varnish-drupal/drupal.vcl deleted file mode 100644 index c1e2ba2103..0000000000 --- a/images/varnish-drupal/drupal.vcl +++ /dev/null @@ -1,477 +0,0 @@ -vcl 4.0; - -import std; -import dynamic; - -# set backend default -backend default { - .host = "${VARNISH_BACKEND_HOST:-nginx}"; - .port = "${VARNISH_BACKEND_PORT:-8080}"; - .first_byte_timeout = 35m; - .between_bytes_timeout = 10m; -} - -# Allow purging from localhost -# @TODO allow from openshift network -acl purge { - "127.0.0.1"; - "10.0.0.0"/8; - "172.16.0.0"/12; - "192.168.0.0"/16; -} - -sub vcl_init { - new www_dir = dynamic.director( - port = "${VARNISH_BACKEND_PORT:-8080}", - first_byte_timeout = 90s, - between_bytes_timeout = 90s, - ttl = 60s); -} - -# This configuration is optimized for Drupal hosting: -# Respond to incoming requests. -sub vcl_recv { - if (req.url ~ "^/varnish_status$") { - return (synth(200,"OK")); - } - # set the backend, which should be used: - set req.backend_hint = www_dir.backend("${VARNISH_BACKEND_HOST:-nginx}"); - - # Always set the forward ip. - if (req.restarts == 0) { - if (req.http.x-forwarded-for) { - set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; - } - else { - set req.http.X-Forwarded-For = client.ip; - } - } - - if (req.http.X-LAGOON-VARNISH ) { - # Pass all Requests which are handled via an upstream Varnish - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, " + req.http.X-LAGOON-VARNISH; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - } - else if (req.http.Fastly-FF) { - # Pass all Requests which are handled via Fastly - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, fastly"; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - set req.http.X-Forwarded-For = req.http.Fastly-Client-IP; - } - else if (req.http.CF-RAY) { - # Pass all Requests which are handled via CloudFlare - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, cloudflare"; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - set req.http.X-Forwarded-For = req.http.CF-Connecting-IP; - } - else if (req.http.X-Pull) { - # Pass all Requests which are handled via KeyCDN - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, keycdn"; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - } - else { - # We set a header to let a Varnish chain know that it already has been varnishcached - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}"; - - # Allow to bypass based on env variable `VARNISH_BYPASS` - set req.http.X-LAGOON-VARNISH-BYPASS = "${VARNISH_BYPASS:-false}"; - } - - # Websockets are piped - if (req.http.Upgrade ~ "(?i)websocket") { - return (pipe); - } - - if (req.http.X-LAGOON-VARNISH-BYPASS == "true" || req.http.X-LAGOON-VARNISH-BYPASS == "TRUE") { - return (pass); - } - - # SA-CORE-2014-004 preventing access to /xmlrpc.php - if (req.url ~ "^/xmlrpc.php$") { - return (synth(701, "Unauthorized")); - } - - # Strip out Google Analytics campaign variables. They are only needed - # by the javascript running on the page - # utm_source, utm_medium, utm_campaign, gclid - if(req.url ~ "(\?|&)(gclid|utm_[a-z]+)=") { - set req.url = regsuball(req.url, "(gclid|utm_[a-z]+)=[^\&]+&?", ""); - set req.url = regsub(req.url, "(\?|&)$", ""); - } - - # Bypass a cache hit (the request is still sent to the backend) - if (req.method == "REFRESH") { - if (!client.ip ~ purge) { - return (synth(405, "Not allowed")); - } - set req.method = "GET"; - set req.hash_always_miss = true; - } - - # Only allow BAN requests from IP addresses in the 'purge' ACL. - if (req.method == "BAN" || req.method == "URIBAN" || req.method == "PURGE") { - # Only allow BAN from defined ACL - if (!client.ip ~ purge) { - return (synth(403, "Your IP is not allowed.")); - } - - # Only allows BAN if the Host Header has the style of with "${SERVICE_NAME:-varnish}:8080" or "${SERVICE_NAME:-varnish}". - # Such a request is only possible from within the Docker network, as a request from external goes trough the Kubernetes Router and for that needs a proper Host Header - if (!req.http.host ~ "^${SERVICE_NAME:-varnish}(:\d+)?$") { - return (synth(403, "Only allowed from within own network.")); - } - - if (req.method == "BAN") { - # Logic for the ban, using the Cache-Tags header. - if (req.http.Cache-Tags) { - ban("obj.http.Cache-Tags ~ " + req.http.Cache-Tags); - # Throw a synthetic page so the request won't go to the backend. - return (synth(200, "Ban added.")); - } - else { - return (synth(403, "Cache-Tags header missing.")); - } - } - - if (req.method == "URIBAN" || req.method == "PURGE") { - ban("req.url ~ " + req.url); - # Throw a synthetic page so the request won't go to the backend. - return (synth(200, "Ban added.")); - } - } - - # Non-RFC2616 or CONNECT which is weird, we pipe that - if (req.method != "GET" && - req.method != "HEAD" && - req.method != "PUT" && - req.method != "POST" && - req.method != "TRACE" && - req.method != "OPTIONS" && - req.method != "DELETE") { - return (pipe); - } - - # Large binary files are passed. - if (req.url ~ "\.(msi|exe|dmg|zip|tgz|gz|pkg)$") { - return(pass); - } - - # We only try to cache GET and HEAD, other things are passed. - if (req.method != "GET" && req.method != "HEAD") { - return (pass); - } - - # Any requests with Basic Authentication are passed. - if (req.http.Authorization || req.http.Authenticate) { - return (pass); - } - - # Blackfire requests are passed. - if (req.http.X-Blackfire-Query) { - return (pass); - } - - # Some URLs should never be cached. - if (req.url ~ "^/status\.php$" || - req.url ~ "^/update\.php$" || - req.url ~ "^/admin([/?]|$).*$" || - req.url ~ "^/info([/?]|$).*$" || - req.url ~ "^/flag([/?]|$).*$" || - req.url ~ "^.*/system/files([/?]|$).*$" || - req.url ~ "^/cgi" || - req.url ~ "^/cgi-bin" - ) { - return (pass); - } - - # Plupload likes to get piped. - if (req.url ~ "^.*/plupload-handle-uploads.*$") { - return (pipe); - } - - # Handle compression correctly. Different browsers send different - # "Accept-Encoding" headers, even though they mostly all support the same - # compression mechanisms. By consolidating these compression headers into - # a consistent format, we can reduce the size of the cache and get more hits.= - # @see: http:// varnish.projects.linpro.no/wiki/FAQ/Compression - if (req.http.Accept-Encoding) { - if (req.http.Accept-Encoding ~ "gzip") { - # If the browser supports it, we'll use gzip. - set req.http.Accept-Encoding = "gzip"; - } - else if (req.http.Accept-Encoding ~ "deflate") { - # Next, try deflate if it is supported. - set req.http.Accept-Encoding = "deflate"; - } - else { - # Unknown algorithm. Remove it and send unencoded. - unset req.http.Accept-Encoding; - } - } - - # Always cache the following file types for all users. - if (req.url ~ "(?i)\.(css|js|jpg|jpeg|gif|ico|png|tiff|tif|img|tga|wmf|swf|html|htm|woff|woff2|mp4|ttf|eot|svg)(\?.*)?$") { - unset req.http.Cookie; - } - - # Remove all cookies that Drupal doesn't need to know about. ANY remaining - # cookie will cause the request to pass-through to a backend. For the most part - # we always set the NO_CACHE cookie after any POST request, disabling the - # Varnish cache temporarily. The session cookie allows all authenticated users - # to pass through as long as they're logged in. - # - # 1. Append a semi-colon to the front of the cookie string. - # 2. Remove all spaces that appear after semi-colons. - # 3. Match the cookies we want to keep, adding the space we removed - # previously, back. (\1) is first matching group in the regsuball. - # 4. Remove all other cookies, identifying them by the fact that they have - # no space after the preceding semi-colon. - # 5. Remove all spaces and semi-colons from the beginning and end of the - # cookie string. - if (req.http.Cookie) { - set req.http.CookieCheck = ";" + req.http.Cookie; - set req.http.CookieCheck = regsuball(req.http.CookieCheck, "; +", ";"); - set req.http.CookieCheck = regsuball(req.http.CookieCheck, ";(${VARNISH_COOKIECHECK:-SESS[a-z0-9]+|SSESS[a-z0-9]+|NO_CACHE})=", "; \1="); - set req.http.CookieCheck = regsuball(req.http.CookieCheck, ";[^ ][^;]*", ""); - set req.http.CookieCheck = regsuball(req.http.CookieCheck, "^[; ]+|[; ]+$", ""); - - set req.http.Cookie = req.http.Cookie + ";"; - - if (req.http.CookieCheck == "") { - # If there are no remaining cookies, remove the cookie header. If there - # aren't any cookie headers, Varnish's default behavior will be to cache - # the page. - - unset req.http.CookieCheck; - unset req.http.Cookie; - } - else { - # If there is any cookies left (a session or NO_CACHE cookie), do not - # cache the page. Pass it on to Apache directly. - unset req.http.CookieCheck; - return (pass); - } - } - - # Cacheable, lookup in cache. - return (hash); -} - -sub vcl_pipe { - # Support for Websockets - if (req.http.upgrade) { - set bereq.http.upgrade = req.http.upgrade; - set bereq.http.connection = req.http.connection; - } -} - -sub vcl_hit { - if (obj.ttl >= 0s) { - # normal hit - return (deliver); - } - # We have no fresh fish. Lets look at the stale ones. - if (std.healthy(req.backend_hint)) { - # Backend is healthy. If the object is not older then 30secs, deliver it to the client - # and automatically create a separate backend request to warm the cache for this request. - if (obj.ttl + 30s > 0s) { - set req.http.grace = "normal(limited)"; - return (deliver); - } else { - # No candidate for grace. Fetch a fresh object. - return (miss); - } - } - else { - # backend is sick - use full grace - if (obj.ttl + obj.grace > 0s) { - set req.http.grace = "full"; - return (deliver); - } else { - # no graced object. - return (miss); - } - } -} - -sub vcl_backend_response { - # Allow items to be stale if needed. - set beresp.grace = 6h; - - # Set ban-lurker friendly custom headers. - set beresp.http.X-Url = bereq.url; - set beresp.http.X-Host = bereq.http.host; - - # If the backend sends a X-LAGOON-VARNISH-BACKEND-BYPASS header we directly deliver - if (beresp.http.X-LAGOON-VARNISH-BACKEND-BYPASS == "TRUE") { - return (deliver); - } - - # Cache 404 and 403 for 10 seconds - if (beresp.status == 404 || beresp.status == 403) { - set beresp.ttl = 10s; - return (deliver); - } - - # Don't allow static files to set cookies. - if (bereq.url ~ "(?i)\.(css|js|jpg|jpeg|gif|ico|png|tiff|tif|img|tga|wmf|swf|html|htm|woff|woff2|mp4|ttf|eot|svg)(\?.*)?$") { - unset beresp.http.set-cookie; - unset beresp.http.Cache-Control; - - # If an asset would come back with statuscode 500 we only cache it for 10 seconds instead of the usual static file cache - if (beresp.status == 500) { - set beresp.ttl = 10s; - return (deliver); - } - - set beresp.ttl = ${VARNISH_ASSETS_TTL:-2628001}s; - set beresp.http.Cache-Control = "public, max-age=${VARNISH_ASSETS_TTL:-2628001}"; - set beresp.http.Expires = "" + (now + beresp.ttl); - } - - # Files larger than 10 MB get streamed. - if (beresp.http.Content-Length ~ "[0-9]{8,}") { - set beresp.do_stream = true; - set beresp.uncacheable = true; - set beresp.ttl = 120s; - } - - # Disable buffering only for BigPipe responses - if (beresp.http.Surrogate-Control ~ "BigPipe/1.0") { - set beresp.do_stream = true; - set beresp.ttl = 0s; - } - - # The following is taken from https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/builtin.vcl#L149 - if (bereq.uncacheable) { - return (deliver); - } else if (beresp.ttl <= 0s || - beresp.http.Set-Cookie || - beresp.http.Surrogate-control ~ "(?i)no-store" || - (!beresp.http.Surrogate-Control && - beresp.http.Cache-Control ~ "(?i:no-cache|no-store|private)") || - beresp.http.Vary == "*") { - # Mark as "Hit-For-Miss" for the next 2 minutes - set beresp.ttl = 120s; - set beresp.uncacheable = true; - } - return (deliver); -} - -# Set a header to track a cache HIT/MISS. -sub vcl_deliver { - if (obj.hits > 0) { - set resp.http.X-Varnish-Cache = "HIT"; - } - else { - set resp.http.X-Varnish-Cache = "MISS"; - } - - # Remove ban-lurker friendly custom headers when delivering to client. - unset resp.http.X-Url; - unset resp.http.X-Host; - - # unset Cache-Tags Header by default, can be disabled with VARNISH_SET_HEADER_CACHE_TAGS=true - if (!${VARNISH_SET_HEADER_CACHE_TAGS:-false}) { - unset resp.http.Cache-Tags; - } - - unset resp.http.X-Generator; - unset resp.http.Server; - # Inject information about grace - if (req.http.grace) { - set resp.http.X-Varnish-Grace = req.http.grace; - } - set resp.http.X-LAGOON = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}>" + resp.http.X-LAGOON; - return (deliver); -} - -sub vcl_hash { - hash_data(req.url); - if (req.http.host) { - hash_data(req.http.host); - } - else { - hash_data(server.ip); - } - if (req.http.X-Forwarded-Proto) { - hash_data(req.http.X-Forwarded-Proto); - } - if (req.http.HTTPS) { - hash_data(req.http.HTTPS); - } - return (lookup); -} - -sub vcl_synth { - if (resp.status == 701) { - set resp.status = 401; - set resp.http.Content-Type = "text/plain; charset=utf-8"; - synthetic({"XMLRPC Interface is blocked due to SA-CORE-2014-004 - mail support@amazee.io if you need it."}); - return (deliver); - } - if (resp.status == 700) { - # Set a status the client will understand - set resp.status = 200; - # Create our synthetic response - synthetic(""); - return(deliver); - } - return (deliver); -} - -sub vcl_backend_error { - # Restart the request, when we have a backend server error, to try another backend. - # Restart max twice. - if (bereq.retries < 2) { - return(retry); - } - - set beresp.http.Content-Type = "text/html; charset=utf-8"; - set beresp.http.Retry-After = "5"; - synthetic({" - - - - - Server Error - - - -
-

We are sorry...

-

We encountered a server-side error. This means that the problem is not with your computer or Internet connection, but rather with the website's server.

-

We are currently working on solving this problem and apologise for the inconvenience.

- - Technical Information
- Error "} + beresp.status + " " + beresp.reason + {"
- XID: "} + bereq.xid + {"
-
-
- - - -"}); - return (deliver); -} diff --git a/images/varnish-persistent-drupal/Dockerfile b/images/varnish-persistent-drupal/Dockerfile deleted file mode 100644 index d7b9b8632a..0000000000 --- a/images/varnish-persistent-drupal/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/varnish-drupal - -VOLUME /var/cache/varnish - -ENV CACHE_TYPE=file,/var/cache/varnish/file \ - CACHE_SIZE=950M diff --git a/images/varnish-persistent/Dockerfile b/images/varnish-persistent/Dockerfile deleted file mode 100644 index 6e6c6566c3..0000000000 --- a/images/varnish-persistent/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/varnish - -VOLUME /var/cache/varnish - -ENV CACHE_TYPE=file,/var/cache/varnish/file \ - CACHE_SIZE=950M diff --git a/images/varnish/Dockerfile b/images/varnish/Dockerfile deleted file mode 100644 index 6cd9c7e89c..0000000000 --- a/images/varnish/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons - - -FROM alpine:3.7 as vmod -ENV LIBVMOD_DYNAMIC_VERSION=5.2 -ENV LIBVMOD_BODYACCESS_VERSION=5.0 -RUN apk --no-cache add varnish varnish-dev automake autoconf libtool python py-docutils make curl - -RUN cd /tmp && curl -sSLO https://github.com/nigoroll/libvmod-dynamic/archive/${LIBVMOD_DYNAMIC_VERSION}.zip && \ - unzip ${LIBVMOD_DYNAMIC_VERSION}.zip && cd libvmod-dynamic-${LIBVMOD_DYNAMIC_VERSION} && \ - ./autogen.sh && ./configure && make && make install - -RUN cd /tmp && curl -sSLO https://github.com/aondio/libvmod-bodyaccess/archive/${LIBVMOD_BODYACCESS_VERSION}.zip && \ - unzip ${LIBVMOD_BODYACCESS_VERSION}.zip && cd libvmod-bodyaccess-${LIBVMOD_BODYACCESS_VERSION} && \ - ./autogen.sh && ./configure && make && make install - -FROM alpine:3.7 -LABEL maintainer="amazee.io" -ENV LAGOON=varnish - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk --no-cache add varnish - -# Add varnish mod after the varnish package creates the directory. -COPY --from=vmod /usr/lib/varnish/vmods/libvmod_dynamic.* /usr/lib/varnish/vmods/ -COPY --from=vmod /usr/lib/varnish/vmods/libvmod_bodyaccess.* /usr/lib/varnish/vmods/ - -RUN echo "${VARNISH_SECRET:-lagoon_default_secret}" >> /etc/varnish/secret - -COPY default.vcl /etc/varnish/default.vcl -COPY varnish-start.sh /varnish-start.sh - -RUN fix-permissions /etc/varnish/ \ - && fix-permissions /var/run/ \ - && fix-permissions /var/lib/varnish - -COPY docker-entrypoint /lagoon/entrypoints/70-varnish-entrypoint - -EXPOSE 8080 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=8080 - -ENV HTTP_RESP_HDR_LEN=8k \ - HTTP_RESP_SIZE=32k \ - NUKE_LIMIT=150 \ - CACHE_TYPE=malloc \ - CACHE_SIZE=500M \ - LISTEN=":8080" \ - MANAGEMENT_LISTEN=":6082" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/varnish-start.sh"] diff --git a/images/varnish/default.vcl b/images/varnish/default.vcl deleted file mode 100644 index 6dcd0a8118..0000000000 --- a/images/varnish/default.vcl +++ /dev/null @@ -1,73 +0,0 @@ -# -# This is an example VCL file for Varnish. -# -# It does not do anything by default, delegating control to the -# builtin VCL. The builtin VCL is called when there is no explicit -# return statement. -# -# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/ -# and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples. - -vcl 4.0; - -import std; -import dynamic; - -# set backend default -backend default { - .host = "${VARNISH_BACKEND_HOST:-nginx}"; - .port = "${VARNISH_BACKEND_PORT:-8080}"; - .first_byte_timeout = 35m; - .between_bytes_timeout = 10m; -} - -sub vcl_init { - new www_dir = dynamic.director( - port = "${VARNISH_BACKEND_PORT:-8080}", - first_byte_timeout = 90s, - between_bytes_timeout = 90s, - ttl = 60s); - } - -sub vcl_recv { - # Happens before we check if we have this in cache already. - # - # Typically you clean up the request here, removing cookies you don't need, - # rewriting the request, etc. - - # set the backend, which should be used: - set req.backend_hint = www_dir.backend("${VARNISH_BACKEND_HOST:-nginx}"); - - # Needed for Readyness and Liveness checks - do not remove - if (req.url ~ "^/varnish_status$") { - return (synth(200,"OK")); - } - - # Large binary files are passed. - if (req.url ~ "\.(msi|exe|dmg|zip|tgz|gz|pkg)$") { - return(pass); - } -} - -sub vcl_backend_response { - # Happens after we have read the response headers from the backend. - # - # Here you clean the response headers, removing silly Set-Cookie headers - # and other mistakes your backend does. - - # Files larger than 10 MB get streamed. - if (beresp.http.Content-Length ~ "[0-9]{8,}") { - set beresp.do_stream = true; - set beresp.uncacheable = true; - set beresp.ttl = 120s; - } - - return (deliver); -} - -sub vcl_deliver { - # Happens when we have all the pieces we need, and are about to send the - # response to the client. - # - # You can do accounting or modifying the final object here. -} diff --git a/images/varnish/docker-entrypoint b/images/varnish/docker-entrypoint deleted file mode 100644 index 5d0aee6097..0000000000 --- a/images/varnish/docker-entrypoint +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -ep /etc/varnish/* diff --git a/images/varnish/varnish-start.sh b/images/varnish/varnish-start.sh deleted file mode 100755 index 7388710e6d..0000000000 --- a/images/varnish/varnish-start.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/sbin/varnishd -a $LISTEN -T $MANAGEMENT_LISTEN -F -f /etc/varnish/default.vcl -S /etc/varnish/secret -p http_resp_hdr_len=$HTTP_RESP_HDR_LEN -p http_resp_size=$HTTP_RESP_SIZE -p nuke_limit=$NUKE_LIMIT -s ${CACHE_TYPE},$CACHE_SIZE -j none diff --git a/images/yarn-workspace-builder/Dockerfile b/images/yarn-workspace-builder/Dockerfile index bcfa7b31a8..0533a60104 100644 --- a/images/yarn-workspace-builder/Dockerfile +++ b/images/yarn-workspace-builder/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/node:10-builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/node-10-builder:${UPSTREAM_TAG:-latest} RUN apk add --no-cache \ libexecinfo-dev \ diff --git a/lagoon-remote/docker-compose.yaml b/lagoon-remote/docker-compose.yaml index 047862340b..e66a6f930c 100644 --- a/lagoon-remote/docker-compose.yaml +++ b/lagoon-remote/docker-compose.yaml @@ -25,10 +25,11 @@ services: lagoon.rollout: daemonset lagoon.template: logs-collector/.lagoon.yml docker-host: - image: amazeeio/docker-host:latest + image: ${IMAGE_REPO:-lagoon}/docker-host labels: lagoon.type: custom lagoon.template: docker-host/docker-host.yaml + lagoon.image: amazeeiolagoon/docker-host:v1-9-1 harborclair: image: ${IMAGE_REPO:-lagoon}/harborclair labels: diff --git a/lagoon-remote/logs-forwarder-logstash/Dockerfile b/lagoon-remote/logs-forwarder-logstash/Dockerfile index 89123441bd..bfeb65277c 100644 --- a/lagoon-remote/logs-forwarder-logstash/Dockerfile +++ b/lagoon-remote/logs-forwarder-logstash/Dockerfile @@ -1,4 +1,4 @@ -FROM amazeeio/logstash +FROM uselagoon/logstash-7 RUN sed -ibak s/^xpack.*//g /usr/share/logstash/config/logstash.yml diff --git a/services/api-db/Dockerfile b/services/api-db/Dockerfile index f588759ba8..91fafdfb31 100644 --- a/services/api-db/Dockerfile +++ b/services/api-db/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/mariadb +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/mariadb:${UPSTREAM_TAG:-latest} USER root RUN apk add --no-cache openssh-keygen diff --git a/services/api-redis/Dockerfile b/services/api-redis/Dockerfile index 3392398948..2ed97fce63 100644 --- a/services/api-redis/Dockerfile +++ b/services/api-redis/Dockerfile @@ -1,4 +1,5 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/redis +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/redis-5:${UPSTREAM_TAG:-latest} ENV REDIS_PASSWORD=admin \ No newline at end of file diff --git a/services/api/Dockerfile b/services/api/Dockerfile index ba213b25ca..9c9d6da050 100644 --- a/services/api/Dockerfile +++ b/services/api/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/auth-server/Dockerfile b/services/auth-server/Dockerfile index 54b1488d31..11914b9821 100644 --- a/services/auth-server/Dockerfile +++ b/services/auth-server/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/backup-handler/Dockerfile b/services/backup-handler/Dockerfile index 87b9c62158..18b7c2fb88 100644 --- a/services/backup-handler/Dockerfile +++ b/services/backup-handler/Dockerfile @@ -1,6 +1,7 @@ # build the binary ARG GO_VERSION -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM golang:${GO_VERSION:-1.13.8} AS builder # bring in all the packages # COPY main.go /go/src/github.com/amazeeio/lagoon/services/backup-handler/ @@ -17,7 +18,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o backup-handler . # put the binary into container # use the commons image to get entrypoints -FROM ${IMAGE_REPO:-lagoon}/commons +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} WORKDIR /app/ diff --git a/services/controllerhandler/Dockerfile b/services/controllerhandler/Dockerfile index f860f00c88..fc904f213c 100644 --- a/services/controllerhandler/Dockerfile +++ b/services/controllerhandler/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/docker-host/docker-host.yaml b/services/docker-host/docker-host.yaml index b584a80aec..54a7033d37 100644 --- a/services/docker-host/docker-host.yaml +++ b/services/docker-host/docker-host.yaml @@ -39,7 +39,7 @@ parameters: value: "Recreate" - name: SERVICE_IMAGE description: Pullable image of service - value: amazeeio/docker-host:latest + value: amazeeiolagoon/docker-host:master objects: - apiVersion: v1 kind: DeploymentConfig diff --git a/services/drush-alias/Dockerfile b/services/drush-alias/Dockerfile index bd3c957a8f..c57604ee63 100644 --- a/services/drush-alias/Dockerfile +++ b/services/drush-alias/Dockerfile @@ -1,4 +1,5 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeiolagoon}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/nginx:${UPSTREAM_TAG:-latest} ADD nginx.conf /etc/nginx/conf.d/app.conf ADD web/ /app/ \ No newline at end of file diff --git a/services/harbor-database/Dockerfile b/services/harbor-database/Dockerfile index 3d6c236c07..6b95716002 100644 --- a/services/harbor-database/Dockerfile +++ b/services/harbor-database/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/postgres +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/postgres-11:${UPSTREAM_TAG:-latest} LABEL maintainer="amazee.io" COPY docker-entrypoint-initdb.d /docker-entrypoint-initdb.d \ No newline at end of file diff --git a/services/keycloak-db/Dockerfile b/services/keycloak-db/Dockerfile index 017ef41f79..bdfbce9798 100644 --- a/services/keycloak-db/Dockerfile +++ b/services/keycloak-db/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/mariadb +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/mariadb:${UPSTREAM_TAG:-latest} ENV MARIADB_DATABASE=keycloak \ MARIADB_USER=keycloak \ diff --git a/services/keycloak/Dockerfile b/services/keycloak/Dockerfile index b632c3a8d7..3e10b82a94 100644 --- a/services/keycloak/Dockerfile +++ b/services/keycloak/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM jboss/keycloak:7.0.1 USER root diff --git a/services/kubernetesbuilddeploy/Dockerfile b/services/kubernetesbuilddeploy/Dockerfile index 087a492d7a..23178dfad9 100644 --- a/services/kubernetesbuilddeploy/Dockerfile +++ b/services/kubernetesbuilddeploy/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/kubernetesbuilddeploymonitor/Dockerfile b/services/kubernetesbuilddeploymonitor/Dockerfile index beabe14b39..c0aed5ce0a 100644 --- a/services/kubernetesbuilddeploymonitor/Dockerfile +++ b/services/kubernetesbuilddeploymonitor/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/kubernetesdeployqueue/Dockerfile b/services/kubernetesdeployqueue/Dockerfile index f3f41b5bbf..4e7184686c 100644 --- a/services/kubernetesdeployqueue/Dockerfile +++ b/services/kubernetesdeployqueue/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/kubernetesjobs/Dockerfile b/services/kubernetesjobs/Dockerfile index 5a5ad2fa6b..cd6142b2f5 100644 --- a/services/kubernetesjobs/Dockerfile +++ b/services/kubernetesjobs/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/kubernetesjobsmonitor/Dockerfile b/services/kubernetesjobsmonitor/Dockerfile index 5a26230c9d..07511d2dbf 100644 --- a/services/kubernetesjobsmonitor/Dockerfile +++ b/services/kubernetesjobsmonitor/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/kubernetesmisc/Dockerfile b/services/kubernetesmisc/Dockerfile index 41f3ca2bc7..0cbcdfdac5 100644 --- a/services/kubernetesmisc/Dockerfile +++ b/services/kubernetesmisc/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/kubernetesremove/Dockerfile b/services/kubernetesremove/Dockerfile index ac3f3d43fe..0b3abed49a 100644 --- a/services/kubernetesremove/Dockerfile +++ b/services/kubernetesremove/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/logs-db-ui/Dockerfile b/services/logs-db-ui/Dockerfile index 7c9f8e3186..00e7a6b338 100644 --- a/services/logs-db-ui/Dockerfile +++ b/services/logs-db-ui/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/kibana:7 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/kibana-7:${UPSTREAM_TAG:-latest} ENV NODE_OPTIONS="--max-old-space-size=2048" \ LOGSDB_KIBANASERVER_PASSWORD=kibanaserver \ diff --git a/services/logs-db/Dockerfile b/services/logs-db/Dockerfile index 870ac74fd1..1dedfb79ab 100644 --- a/services/logs-db/Dockerfile +++ b/services/logs-db/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/elasticsearch:7 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/elasticsearch-7:${UPSTREAM_TAG:-latest} RUN bin/elasticsearch-plugin install -b https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-security/opendistro_security-1.6.0.0.zip \ && bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-sql/opendistro_sql-1.6.0.0.zip \ diff --git a/services/logs2email/Dockerfile b/services/logs2email/Dockerfile index 7b7019b019..5bd482502b 100644 --- a/services/logs2email/Dockerfile +++ b/services/logs2email/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} COPY entrypoints/50-ssmtp.sh /lagoon/entrypoints/ COPY ssmtp.conf /etc/ssmtp/ssmtp.conf diff --git a/services/logs2logs-db/Dockerfile b/services/logs2logs-db/Dockerfile index 63655e5b6f..8a080d925a 100644 --- a/services/logs2logs-db/Dockerfile +++ b/services/logs2logs-db/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/logstash:7 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/logstash-7:${UPSTREAM_TAG:-latest} RUN bin/logstash-plugin install logstash-input-lumberjack diff --git a/services/logs2microsoftteams/Dockerfile b/services/logs2microsoftteams/Dockerfile index f58da6d5c9..bb1d76620e 100644 --- a/services/logs2microsoftteams/Dockerfile +++ b/services/logs2microsoftteams/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/logs2rocketchat/Dockerfile b/services/logs2rocketchat/Dockerfile index c2fde9d7c7..180a05b010 100644 --- a/services/logs2rocketchat/Dockerfile +++ b/services/logs2rocketchat/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/logs2slack/Dockerfile b/services/logs2slack/Dockerfile index 757f8c6242..c4c3aff566 100644 --- a/services/logs2slack/Dockerfile +++ b/services/logs2slack/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/openshiftbuilddeploy/Dockerfile b/services/openshiftbuilddeploy/Dockerfile index 52cc20db64..d0f22508c5 100644 --- a/services/openshiftbuilddeploy/Dockerfile +++ b/services/openshiftbuilddeploy/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/openshiftbuilddeploymonitor/Dockerfile b/services/openshiftbuilddeploymonitor/Dockerfile index 0e43e55b83..07e6da0b8f 100644 --- a/services/openshiftbuilddeploymonitor/Dockerfile +++ b/services/openshiftbuilddeploymonitor/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/openshiftjobs/Dockerfile b/services/openshiftjobs/Dockerfile index 9a73d254e7..89d7b07cea 100644 --- a/services/openshiftjobs/Dockerfile +++ b/services/openshiftjobs/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/openshiftjobsmonitor/Dockerfile b/services/openshiftjobsmonitor/Dockerfile index d3a6393fbf..2a7d028e91 100644 --- a/services/openshiftjobsmonitor/Dockerfile +++ b/services/openshiftjobsmonitor/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/openshiftmisc/Dockerfile b/services/openshiftmisc/Dockerfile index 8d1a1a713d..7ef2ad6034 100644 --- a/services/openshiftmisc/Dockerfile +++ b/services/openshiftmisc/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/openshiftremove/Dockerfile b/services/openshiftremove/Dockerfile index 515b16c7e9..e3d6b9fefc 100644 --- a/services/openshiftremove/Dockerfile +++ b/services/openshiftremove/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/ssh/Dockerfile b/services/ssh/Dockerfile index 2673e3f32b..4b5bc568dd 100644 --- a/services/ssh/Dockerfile +++ b/services/ssh/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM ubuntu:18.04 LABEL maintainer="amazee.io" diff --git a/services/ui/Dockerfile b/services/ui/Dockerfile index 2592eae896..530ac6f7f1 100644 --- a/services/ui/Dockerfile +++ b/services/ui/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/webhook-handler/Dockerfile b/services/webhook-handler/Dockerfile index 90ccd908c3..78383799a8 100644 --- a/services/webhook-handler/Dockerfile +++ b/services/webhook-handler/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/webhooks2tasks/Dockerfile b/services/webhooks2tasks/Dockerfile index e3b2578c2e..c1170cf634 100644 --- a/services/webhooks2tasks/Dockerfile +++ b/services/webhooks2tasks/Dockerfile @@ -1,10 +1,12 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/tests/Dockerfile b/tests/Dockerfile index 9cc06e73df..61a4db44e3 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/python:2.7 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/python-2.7:${UPSTREAM_TAG:-latest} RUN apk add --no-cache \ bash \ diff --git a/tests/files/active-standby/first/Dockerfile b/tests/files/active-standby/first/Dockerfile index 005df92737..755cb33849 100644 --- a/tests/files/active-standby/first/Dockerfile +++ b/tests/files/active-standby/first/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY redirects-map.conf /etc/nginx/redirects-map.conf diff --git a/tests/files/active-standby/second/Dockerfile b/tests/files/active-standby/second/Dockerfile index 005df92737..755cb33849 100644 --- a/tests/files/active-standby/second/Dockerfile +++ b/tests/files/active-standby/second/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY redirects-map.conf /etc/nginx/redirects-map.conf diff --git a/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile index dd4c9fb322..8e10d09475 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.2-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.2-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile index 8e49056370..47e94916f2 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.2-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.2-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile index 87f50d9337..797be38689 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile @@ -1,3 +1,3 @@ -ARG IMAGE_REPO - -FROM ${IMAGE_REPO:-amazeeio}/solr:5.5-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/solr-5.5-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile index 42343c4f02..a147b4cd4e 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.3-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.3-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile index 1a4c836498..ea3020919e 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.3-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.3-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile index 87f50d9337..797be38689 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile @@ -1,3 +1,3 @@ -ARG IMAGE_REPO - -FROM ${IMAGE_REPO:-amazeeio}/solr:5.5-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/solr-5.5-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile index c260c36f1f..bc520e5fb9 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile index e219509639..5a3153de9e 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile index b05e244071..24af894aba 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile @@ -1,3 +1,4 @@ -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG -FROM ${IMAGE_REPO:-amazeeio}/solr:7.7-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/solr-7.7-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile index c260c36f1f..bc520e5fb9 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile index e219509639..5a3153de9e 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile index b05e244071..24af894aba 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile @@ -1,3 +1,4 @@ -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG -FROM ${IMAGE_REPO:-amazeeio}/solr:7.7-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/solr-7.7-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/elasticsearch-cluster/elasticsearch.dockerfile b/tests/files/elasticsearch-cluster/elasticsearch.dockerfile index fe5b44dbd5..305ca5a466 100644 --- a/tests/files/elasticsearch-cluster/elasticsearch.dockerfile +++ b/tests/files/elasticsearch-cluster/elasticsearch.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/elasticsearch:6 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/elasticsearch-6:${UPSTREAM_TAG:-latest} diff --git a/tests/files/elasticsearch-cluster/nginx.dockerfile b/tests/files/elasticsearch-cluster/nginx.dockerfile index 698e3f54fb..69ddd7fb7a 100644 --- a/tests/files/elasticsearch-cluster/nginx.dockerfile +++ b/tests/files/elasticsearch-cluster/nginx.dockerfile @@ -1,4 +1,5 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY app.conf /etc/nginx/conf.d/app.conf diff --git a/tests/files/elasticsearch/elasticsearch.dockerfile b/tests/files/elasticsearch/elasticsearch.dockerfile index fe5b44dbd5..305ca5a466 100644 --- a/tests/files/elasticsearch/elasticsearch.dockerfile +++ b/tests/files/elasticsearch/elasticsearch.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/elasticsearch:6 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/elasticsearch-6:${UPSTREAM_TAG:-latest} diff --git a/tests/files/elasticsearch/nginx.dockerfile b/tests/files/elasticsearch/nginx.dockerfile index 698e3f54fb..69ddd7fb7a 100644 --- a/tests/files/elasticsearch/nginx.dockerfile +++ b/tests/files/elasticsearch/nginx.dockerfile @@ -1,4 +1,5 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY app.conf /etc/nginx/conf.d/app.conf diff --git a/tests/files/features-autogenerated-routes-disabled/Dockerfile b/tests/files/features-autogenerated-routes-disabled/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-autogenerated-routes-disabled/Dockerfile +++ b/tests/files/features-autogenerated-routes-disabled/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features-disable-inject-git-sha/Dockerfile b/tests/files/features-disable-inject-git-sha/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-disable-inject-git-sha/Dockerfile +++ b/tests/files/features-disable-inject-git-sha/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features-lagoon-type-override/Dockerfile b/tests/files/features-lagoon-type-override/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-lagoon-type-override/Dockerfile +++ b/tests/files/features-lagoon-type-override/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile b/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile +++ b/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features/Dockerfile b/tests/files/features/Dockerfile index 5e9c6907c7..eb04a4aaa2 100644 --- a/tests/files/features/Dockerfile +++ b/tests/files/features/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/nginx/first/Dockerfile b/tests/files/nginx/first/Dockerfile index f0bff5c4ee..8f7da7b683 100644 --- a/tests/files/nginx/first/Dockerfile +++ b/tests/files/nginx/first/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY redirects-map.conf /etc/nginx/redirects-map.conf diff --git a/tests/files/nginx/first/basic-auth-disable.dockerfile b/tests/files/nginx/first/basic-auth-disable.dockerfile index cb20a9a8d5..f49d9d19a5 100644 --- a/tests/files/nginx/first/basic-auth-disable.dockerfile +++ b/tests/files/nginx/first/basic-auth-disable.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} ENV BASIC_AUTH_USERNAME=username \ BASIC_AUTH_PASSWORD=password diff --git a/tests/files/nginx/first/basic-auth.dockerfile b/tests/files/nginx/first/basic-auth.dockerfile index 253787c713..1febe3990e 100644 --- a/tests/files/nginx/first/basic-auth.dockerfile +++ b/tests/files/nginx/first/basic-auth.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} ENV BASIC_AUTH_USERNAME=username \ BASIC_AUTH_PASSWORD=password diff --git a/tests/files/node10/Dockerfile b/tests/files/node10/Dockerfile index 18931de976..3fc1f218c2 100644 --- a/tests/files/node10/Dockerfile +++ b/tests/files/node10/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/node12/Dockerfile b/tests/files/node12/Dockerfile index c1293c12df..e608ba240a 100644 --- a/tests/files/node12/Dockerfile +++ b/tests/files/node12/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:12-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-12-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:12 +FROM ${UPSTREAM_REPO:-testlagoon}/node-12:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/node14/Dockerfile b/tests/files/node14/Dockerfile index 6f7285f9cd..76f4f7310c 100644 --- a/tests/files/node14/Dockerfile +++ b/tests/files/node14/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:14-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-14-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:14 +FROM ${UPSTREAM_REPO:-testlagoon}/node-14:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/