Collapse Environment Files 83/6783/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 5 Oct 2017 18:35:37 +0000 (11:35 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 5 Oct 2017 18:38:15 +0000 (11:38 -0700)
Having all the environment variables in one place should help people
track down where settings are instead of having to dig through several
files.

Change-Id: Iceea0e7bf508f7a427a777077ed23b51e6791f0d
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
config.env [moved from config/gerrit.env with 51% similarity]
config/jenkins.env [deleted file]
config/ldap.env [deleted file]
config/postgres.env [deleted file]
docker-compose.yml

similarity index 51%
rename from config/gerrit.env
rename to config.env
index 2a90285..1e085e9 100644 (file)
@@ -1,21 +1,12 @@
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
-
+##
+# Gerrit
+##
 #GERRIT_INIT_ARGS=" \
 #  --install-plugin=download-commands \
 #  --install-plugin=commit-message-length-validator \
 #  --install-plugin=replication \
 #  --install-plugin=delete-project \
 # "
-
 WEBURL=http://gerrit.localhost
 #DATABASE_TYPE=postgresql
 AUTH_TYPE=LDAP
@@ -30,6 +21,32 @@ LDAP_GROUPBASE=ou=Groups,dc=example,dc=org
 LDAP_GROUPMEMBERPATTERN=(member=${dn})
 LDAP_LOCALUSERNAMETOLOWERCASE=true
 
-# nginx-proxy
-VIRTUAL_HOST=gerrit.localhost
-VIRTUAL_PORT=8080
+##
+# Jenkins
+##
+JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
+JENKINS_OPTS=""
+JENKINS_ADMIN_USER=admin
+JENKINS_ADMIN_PASSWORD=password
+
+##
+# Postgres
+##
+POSTGRES_USER=gerrit2
+POSTGRES_PASSWORD=gerrit
+POSTGRES_DB=reviewdb
+
+##
+# OpenLDAP
+##
+LDAP_ORGANISATION=Test Org
+LDAP_DOMAIN=example.org
+# Only set this if you want it different from the LDAP_DOMAIN
+LDAP_BASE_DN=dc=example,dc=org
+LDAP_READONLY_USER=true
+LDAP_READONLY_USER_USERNAME=readonly
+LDAP_READONLY_USER_PASSWORD=readonly
+LDAP_ADMIN_PASSWORD=admin
+LDAP_TLS=false
+LDAP_TLS_ENFORCE=false
+LDAP_REMOVE_CONFIG_AFTER_SETUP=false
diff --git a/config/jenkins.env b/config/jenkins.env
deleted file mode 100644 (file)
index 4f76cf1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
-JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
-JENKINS_OPTS=""
-
-JENKINS_ADMIN_USER=admin
-JENKINS_ADMIN_PASSWORD=password
-
-# nginx-proxy
-VIRTUAL_HOST=jenkins.localhost
-VIRTUAL_PORT=8080
diff --git a/config/ldap.env b/config/ldap.env
deleted file mode 100644 (file)
index dbc43a6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
-LDAP_ORGANISATION=Test Org
-LDAP_DOMAIN=example.org
-# Only set this if you want it different from the LDAP_DOMAIN
-LDAP_BASE_DN=dc=example,dc=org
-
-LDAP_READONLY_USER=true
-LDAP_READONLY_USER_USERNAME=readonly
-LDAP_READONLY_USER_PASSWORD=readonly
-
-LDAP_ADMIN_PASSWORD=admin
-
-LDAP_TLS=false
-LDAP_TLS_ENFORCE=false
-
-LDAP_REMOVE_CONFIG_AFTER_SETUP=false
diff --git a/config/postgres.env b/config/postgres.env
deleted file mode 100644 (file)
index bdffe8b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
-POSTGRES_USER=gerrit2
-POSTGRES_PASSWORD=gerrit
-POSTGRES_DB=reviewdb
index b493244..e5a0684 100644 (file)
@@ -13,7 +13,7 @@ services:
     ldap:
         image: osixia/openldap:latest
         container_name: releng-ldap
-        env_file: config/ldap.env
+        env_file: config.env
         command: "--loglevel debug --copy-service"
         volumes:
             - ./config/ldap/bootstrap/groups.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/50-groups.ldif
@@ -22,7 +22,10 @@ services:
     jenkins:
         build: ./jenkins
         container_name: releng-jenkins
-        env_file: config/jenkins.env
+        env_file: config.env
+        environment:
+            - VIRTUAL_HOST=jenkins.localhost
+            - VIRTUAL_PORT=8080
         volumes:
             - jenkins:/var/jenkins_home
         expose:
@@ -44,7 +47,10 @@ services:
     gerrit:
         image: openfrontier/gerrit:latest
         container_name: releng-gerrit
-        env_file: config/gerrit.env
+        env_file: config.env
+        environment:
+            - VIRTUAL_HOST=gerrit.localhost
+            - VIRTUAL_PORT=8080
         volumes:
             - gerrit:/var/gerrit/review_site
         expose:
@@ -59,7 +65,7 @@ services:
             - nginx
     postgres:
         image: postgres:latest
-        env_file: config/postgres.env
+        env_file: config.env
         expose:
             - "5432"
     nginx: