Skip to content

Commit 887204d

Browse files
authored
Merge pull request #458 from continuouspipe/feature/support-customising-tideways-hostname
Support customising tideways hostname and environment
2 parents e21bfa4 + dec5eef commit 887204d

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

tideways/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ RUN echo 'deb http://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages debian m
1313
&& rm -rf /var/lib/apt/lists/*
1414

1515
COPY ./etc/ /etc/
16+
COPY ./usr/ /usr/

tideways/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,13 @@ daemon will forward the generated PHP profile logs to the Tideways API.
3232

3333
As for all images based on the ubuntu base image, see
3434
[the base image README](../../ubuntu/16.04/README.md)
35+
36+
37+
#### Environment variables
38+
39+
The following variables are supported
40+
41+
Variable | Description | Expected values | Default
42+
--- | --- | --- | ----
43+
TIDEWAYS_HOSTNAME | The domain of the website to help filter in the Tideways UI | a domain | tideways-daemon
44+
TIDEWAYS_ENVIRONMENT | The environment of the website to help filter in the Tideways UI, if your plan allows for more than one environment | string | production

tideways/etc/confd/templates/supervisor/tideways_daemon.conf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[program:tideways_daemon]
2-
command = /usr/bin/tideways-daemon --hostname=tideways-daemon --address=0.0.0.0:9135 --udp=0.0.0.0:9136
2+
command = /usr/bin/tideways-daemon --hostname="{{ getenv "TIDEWAYS_HOSTNAME" }}" --address=0.0.0.0:9135 --udp=0.0.0.0:9136 --env="{{ getenv "TIDEWAYS_ENVIRONMENT" }}"
33
stdout_logfile=/dev/stdout
44
stdout_logfile_maxbytes=0
55
stderr_logfile=/dev/stderr

tideways/usr/local/share/env/40-stack

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
export TIDEWAYS_HOSTNAME=${TIDEWAYS_HOSTNAME:-tideways-daemon}
4+
export TIDEWAYS_ENVIRONMENT=${TIDEWAYS_ENVIRONMENT:-production}

0 commit comments

Comments
 (0)