File tree Expand file tree Collapse file tree 4 files changed +30
-46
lines changed Expand file tree Collapse file tree 4 files changed +30
-46
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ RUN a2enmod userdir && a2enmod rewrite && a2enmod ssl && a2enmod expires
64
64
65
65
# Environment variables contained within build container.
66
66
ENV TERM=xterm \
67
+ LISTEN_PORT=80 \
67
68
APACHE_RUN_USER=www-data \
68
69
APACHE_RUN_GROUP=www-data \
69
70
APACHE_LOG_DIR=/var/log/apache2 \
@@ -92,8 +93,10 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
92
93
org.label-schema.version=$VERSION \
93
94
org.label-schema.schema-version="1.0"
94
95
95
- # Add VOLUMEs to allow backup of config and databases
96
- VOLUME ["/data" ]
96
+ # Add VOLUMEs for persistant data or to allow various
97
+ # backups of config and databases via --volumes-from
98
+ # http://bit.ly/autobuild-and-autodeploy
99
+ VOLUME ["/backup" ]
97
100
98
101
# Note that EXPOSE only works for inter-container links. It doesn't make ports
99
102
# accessible from the host. To expose port(s) to the host, at runtime, use the -p flag.
Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ Group www-data
3
3
ServerName apache
4
4
ServerAdmin hosting@htmlgraphic.com
5
5
6
+ <Directory /data/www/public_html>
7
+ Options +FollowSymLinks +Includes -Indexes -MultiViews +SymLinksIfOwnerMatch
8
+ AllowOverride All
9
+ Allow from all
10
+ Require all granted
11
+ </Directory>
12
+
6
13
<VirtualHost *:80>
7
14
DocumentRoot /data/www/public_html
8
15
CustomLog /data/apache2/logs/access_log combined
@@ -20,30 +27,10 @@ ServerAdmin hosting@htmlgraphic.com
20
27
SSLCertificateFile /data/apache2/ssl/ssl-cert-snakeoil.pem
21
28
SSLCertificateKeyFile /data/apache2/ssl/ssl-cert-snakeoil.key
22
29
23
- <FilesMatch "\.(cgi|shtml|phtml|php)$">
24
- SSLOptions +StdEnvVars
25
- </FilesMatch>
26
- <Directory /usr/lib/cgi-bin>
27
- SSLOptions +StdEnvVars
28
- </Directory>
29
- BrowserMatch "MSIE [2-6]" \
30
- nokeepalive ssl-unclean-shutdown \
31
- downgrade-1.0 force-response-1.0
32
- BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
33
-
34
30
CustomLog /data/apache2/logs/access_log combined
35
31
ErrorLog /data/apache2/logs/error_log
36
32
</VirtualHost>
37
33
38
-
39
- <Directory /data/www/public_html>
40
- Options +FollowSymLinks +Includes -Indexes -MultiViews +SymLinksIfOwnerMatch
41
- AllowOverride All
42
- Allow from all
43
- Require all granted
44
- </Directory>
45
-
46
-
47
34
<FilesMatch "^\.ht">
48
35
Order allow,deny
49
36
Deny from all
Original file line number Diff line number Diff line change 19
19
word-wrap: break-word;
20
20
}
21
21
.h {
22
- background-color: #99c;
23
- font-weight: bold;
22
+ background-color: #99c;
23
+ font-weight: bold;
24
24
}
25
25
.center table {
26
- margin: 1em auto;
27
- text-align: left;
26
+ margin: 1em auto;
27
+ text-align: left;
28
28
}
29
29
table {
30
- border-collapse: collapse;
31
- border: 0;
32
- width: 934px;
30
+ border-collapse: collapse;
31
+ border: 0;
32
+ width: 934px;
33
33
}
34
34
td, th {
35
- border: 1px solid #666;
36
- vertical-align: baseline;
37
- padding: 4px 5px;
35
+ border: 1px solid #666;
36
+ vertical-align: baseline;
37
+ padding: 4px 5px;
38
38
}
39
39
img {
40
- float: right;
41
- border: 0;
40
+ float: right;
41
+ border: 0;
42
42
}
43
43
.h h1 {
44
- font-size: 150%;
44
+ font-size: 150%;
45
45
}
46
46
</style>
47
47
50
50
$ node_env = getenv ('NODE_ENVIRONMENT ' );
51
51
} else {
52
52
$ node_env = 'NOT SET ' ;
53
- }
54
-
55
- if (getenv ('DOCKERCLOUD_SERVICE_FQDN ' )) {
56
- $ hostname = getenv ('DOCKERCLOUD_SERVICE_FQDN ' );
57
- } else {
58
- $ hostname = getenv ('HOSTNAME ' );
59
- }
60
- ?>
53
+ } ?>
61
54
</head>
62
55
<body>
63
56
<?= "<!-- NODE_ENVIRONMENT= " . getenv ('NODE_ENVIRONMENT ' ) ." --> " ; ?>
74
67
</tr>
75
68
<tr>
76
69
<td class="text-right">HOSTNAME</td>
77
- <td class="text-left"><?= $ hostname ?> </td>
70
+ <td class="text-left"><?= getenv ( ' HOSTNAME ' ) ?> </td>
78
71
</tr>
79
72
<?php if ($ node_env == 'dev ' ) { ?>
80
73
<?php if (getenv ('MYSQL_PORT ' )) {?>
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ testNODE_ENVIRONMENT()
74
74
node_env=0;
75
75
76
76
# Depending on the type of environment dev or production an
77
- # environmental variable should be set
77
+ # environment variable should be set
78
78
if [[ ${NODE_ENVIRONMENT} == ' dev' ]] || [[ ${NODE_ENVIRONMENT} == ' production' ]]; then
79
79
node_env=1;
80
80
fi
@@ -87,11 +87,12 @@ testNODE_ENVIRONMENT_PHP()
87
87
{
88
88
echo ' Test env NODE_ENVIRONMENT within Apache'
89
89
node_env=0;
90
+
90
91
dev=$( /usr/bin/wget -q -O- http://127.0.0.1 | grep -w " NODE_ENVIRONMENT=dev" | wc -l) ;
91
92
prod=$( /usr/bin/wget -q -O- http://127.0.0.1 | grep -w " NODE_ENVIRONMENT=production" | wc -l)
92
93
93
94
# Depending on the type of environment dev or production an
94
- # environmental variable should be set
95
+ # environment variable should be set
95
96
if [[ $dev == 1 ]] || [[ $prod == 1 ]]; then
96
97
node_env=1;
97
98
fi
You can’t perform that action at this time.
0 commit comments