dewrich commented on a change in pull request #2412: TO -- full TrafficOps/db 
within docker
URL: https://github.com/apache/trafficcontrol/pull/2412#discussion_r195496132
 
 

 ##########
 File path: infrastructure/cdn-in-a-box/traffic_ops/config.sh
 ##########
 @@ -0,0 +1,128 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Script for running the Dockerfile for Traffic Ops.
+# The Dockerfile sets up a Docker image which can be used for any new Traffic 
Ops container;
+# This script, which should be run when the container is run (it's the 
ENTRYPOINT), will configure the container.
+#
+# The following environment variables must be set, ordinarily by `docker run 
-e` arguments:
+# DB_SERVER
+# DB_PORT
+# DB_ROOT_PASS
+# DB_USER
+# DB_USER_PASS
+# DB_NAME
+# ADMIN_USER
+# ADMIN_PASS
+# CERT_COUNTRY
+# CERT_STATE
+# CERT_CITY
+# CERT_COMPANY
+# DOMAIN
+
+# Check that env vars are set
+envvars=( DB_SERVER DB_PORT DB_ROOT_PASS DB_USER DB_USER_PASS ADMIN_USER 
ADMIN_PASS CERT_COUNTRY CERT_STATE CERT_CITY CERT_COMPANY DOMAIN)
+for v in $envvars
+do
+       if [[ -z $$v ]]; then echo "$v is unset"; exit 1; fi
+done
+
+key=/server.key
+crt=/server.crt
+
+cat <<-EOF >/opt/traffic_ops/app/conf/cdn.conf
+{
+    "hypnotoad" : {
+        "listen" : [
+            
"https://trafficops-perl:60443?cert=$crt&key=$key&verify=0x00&ciphers=AES128-GCM-SHA256:HIGH:!RC4:!MD5:!aNULL:!EDH:!ED";
+        ],
+        "user" : "trafops",
+        "group" : "trafops",
+        "heartbeat_timeout" : 20,
+        "pid_file" : "/var/run/traffic_ops.pid",
+        "workers" : 12
+    },
+    "traffic_ops_golang" : {
+       "insecure": true,
+        "port" : "443",
+        "proxy_timeout" : 60,
+        "proxy_keep_alive" : 60,
+        "proxy_tls_timeout" : 60,
+        "proxy_read_header_timeout" : 60,
+        "read_timeout" : 60,
+        "read_header_timeout" : 60,
+        "write_timeout" : 60,
+        "idle_timeout" : 60,
+        "log_location_error": "/var/log/traffic_ops/error.log",
 
 Review comment:
   probably should have the path output for each of these log messages going to 
`stdout|stderr` (based upon which output shows in the `docker logs` command)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to