Skip to content

Commit 21b9658

Browse files
authored
Merge pull request #54 from devilbox/release-0.49b
Release 0.49b (beta)
2 parents 565e7c1 + afe9be1 commit 21b9658

File tree

112 files changed

+7080
-2232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+7080
-2232
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: docker-compose
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
pull_request:
14+
paths:
15+
- '.github/workflows/docker-compose.yml'
16+
- 'Dockerfiles/**'
17+
- 'examples/**/docker-compose.yml'
18+
- 'examples/**/integration-test.sh'
19+
- 'examples/integration-test.sh'
20+
21+
22+
jobs:
23+
docker-compose:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
29+
- name: 'docker-compose: main-vhost Static Files'
30+
run: |
31+
cd ./examples/default-vhost__static-files/
32+
./integration-test.sh
33+
34+
- name: 'docker-compose: main-vhost PHP-FPM'
35+
run: |
36+
cd ./examples/default-vhost__php-fpm/
37+
./integration-test.sh
38+
39+
- name: 'docker-compose: main-vhost PHP-FPM (SSL)'
40+
run: |
41+
cd ./examples/default-vhost__php-fpm__ssl/
42+
./integration-test.sh
43+
44+
- name: 'docker-compose: main-vhost Reverse Proxy (NodeJS)'
45+
run: |
46+
cd ./examples/default-vhost__reverse-proxy__node/
47+
./integration-test.sh
48+
49+
- name: 'docker-compose: mass-vhost PHP-FPM (SSL)'
50+
run: |
51+
cd ./examples/mass-vhost__php-fpm__ssl/
52+
./integration-test.sh
53+
54+
- name: 'docker-compose: mass-vhost Reverse Proxy (SSL)'
55+
run: |
56+
cd ./examples/mass-vhost__reverse-proxy__ssl/
57+
./integration-test.sh

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
Makefile.docker
22
Makefile.lint
3+
devilbox-ca.crt
4+
devilbox-ca.key
5+
devilbox-ca.srl

Dockerfiles/Dockerfile.alpine

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# vi: ft=dockerfile
12
FROM httpd:2.4-alpine
23
MAINTAINER "cytopia" <cytopia@everythingcli.org>
34

@@ -11,9 +12,9 @@ LABEL \
1112
###
1213
### Build arguments
1314
###
14-
ARG VHOST_GEN_GIT_REF=1.0.3
15-
ARG WATCHERD_GIT_REF=v1.0.2
16-
ARG CERT_GEN_GIT_REF=0.7
15+
ARG VHOST_GEN_GIT_REF=1.0.8
16+
ARG WATCHERD_GIT_REF=v1.0.7
17+
ARG CERT_GEN_GIT_REF=0.10
1718

1819
ENV BUILD_DEPS \
1920
make \
@@ -29,16 +30,7 @@ ENV RUN_DEPS \
2930
tzdata
3031

3132

32-
###
33-
### Runtime arguments
34-
###
35-
ENV MY_USER=www-data
36-
ENV MY_GROUP=www-data
37-
ENV HTTPD_START="httpd-foreground"
38-
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"
39-
40-
41-
###
33+
##
4234
### Install required packages
4335
###
4436
RUN set -eux \
@@ -61,7 +53,7 @@ RUN set -eux \
6153
&& chmod +x /usr/bin/cert-gen \
6254
\
6355
# Install watcherd
64-
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \
56+
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/bin/watcherd \
6557
&& chmod +x /usr/bin/watcherd \
6658
\
6759
# Clean-up
@@ -81,6 +73,9 @@ RUN set -eux \
8173
echo "LoadModule proxy_module modules/mod_proxy.so"; \
8274
echo "LoadModule proxy_http_module modules/mod_proxy_http.so"; \
8375
echo "LoadModule proxy_http2_module modules/mod_proxy_http2.so"; \
76+
echo "LoadModule proxy_html_module modules/mod_proxy_html.so"; \
77+
# [proxy_html] I18n support in mod_proxy_html requires mod_xml2enc.
78+
echo "LoadModule xml2enc_module modules/mod_xml2enc.so"; \
8479
echo "LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so"; \
8580
echo "LoadModule rewrite_module modules/mod_rewrite.so"; \
8681
\
@@ -119,6 +114,17 @@ RUN set -eux \
119114
) >> /usr/local/apache2/conf/httpd.conf
120115

121116

117+
###
118+
### Runtime arguments
119+
###
120+
ENV MY_USER=www-data
121+
ENV MY_GROUP=www-data
122+
ENV HTTPD_START="httpd-foreground"
123+
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"
124+
ENV HTTPD_VERSION="httpd -V 2>&1 | head -1 | awk '{print \$3}'"
125+
ENV VHOSTGEN_HTTPD_SERVER="apache24"
126+
127+
122128
###
123129
### Create directories
124130
###
@@ -127,6 +133,7 @@ RUN set -eux \
127133
&& mkdir -p /etc/httpd/conf.d \
128134
&& mkdir -p /etc/httpd/vhost.d \
129135
&& mkdir -p /var/www/default/htdocs \
136+
&& mkdir -p /var/log/httpd \
130137
&& mkdir -p /shared/httpd \
131138
&& chmod 0775 /shared/httpd \
132139
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd
@@ -139,12 +146,20 @@ RUN set -eux \
139146
&& ln -sf /usr/bin/python3 /usr/bin/python
140147

141148

149+
###
150+
### Set timezone
151+
###
152+
RUN set -eux \
153+
&& if [ -f /etc/localtime ]; then rm /etc/localtime; fi \
154+
&& ln -s /usr/share/zoneinfo/UTC /etc/localtime
155+
156+
142157
###
143158
### Copy files
144159
###
145-
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
146-
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
160+
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
147161
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh
162+
148163
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
149164
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
150165

Dockerfiles/Dockerfile.debian

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# vi: ft=dockerfile
12
FROM httpd:2.4
23
MAINTAINER "cytopia" <cytopia@everythingcli.org>
34

@@ -11,9 +12,9 @@ LABEL \
1112
###
1213
### Build arguments
1314
###
14-
ARG VHOST_GEN_GIT_REF=1.0.3
15-
ARG WATCHERD_GIT_REF=v1.0.2
16-
ARG CERT_GEN_GIT_REF=0.7
15+
ARG VHOST_GEN_GIT_REF=1.0.8
16+
ARG WATCHERD_GIT_REF=v1.0.7
17+
ARG CERT_GEN_GIT_REF=0.10
1718

1819
ENV BUILD_DEPS \
1920
make \
@@ -25,15 +26,6 @@ ENV RUN_DEPS \
2526
supervisor
2627

2728

28-
###
29-
### Runtime arguments
30-
###
31-
ENV MY_USER=www-data
32-
ENV MY_GROUP=www-data
33-
ENV HTTPD_START="httpd-foreground"
34-
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"
35-
36-
3729
###
3830
### Install required packages
3931
###
@@ -58,7 +50,7 @@ RUN set -eux \
5850
&& chmod +x /usr/bin/cert-gen \
5951
\
6052
# Install watcherd
61-
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \
53+
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/bin/watcherd \
6254
&& chmod +x /usr/bin/watcherd \
6355
\
6456
# Clean-up
@@ -79,6 +71,9 @@ RUN set -eux \
7971
echo "LoadModule proxy_module modules/mod_proxy.so"; \
8072
echo "LoadModule proxy_http_module modules/mod_proxy_http.so"; \
8173
echo "LoadModule proxy_http2_module modules/mod_proxy_http2.so"; \
74+
echo "LoadModule proxy_html_module modules/mod_proxy_html.so"; \
75+
# [proxy_html] I18n support in mod_proxy_html requires mod_xml2enc.
76+
echo "LoadModule xml2enc_module modules/mod_xml2enc.so"; \
8277
echo "LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so"; \
8378
echo "LoadModule rewrite_module modules/mod_rewrite.so"; \
8479
\
@@ -117,6 +112,17 @@ RUN set -eux \
117112
) >> /usr/local/apache2/conf/httpd.conf
118113

119114

115+
###
116+
### Runtime arguments
117+
###
118+
ENV MY_USER=www-data
119+
ENV MY_GROUP=www-data
120+
ENV HTTPD_START="httpd-foreground"
121+
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"
122+
ENV HTTPD_VERSION="httpd -V 2>&1 | head -1 | awk '{print \$3}'"
123+
ENV VHOSTGEN_HTTPD_SERVER="apache24"
124+
125+
120126
###
121127
### Create directories
122128
###
@@ -125,6 +131,7 @@ RUN set -eux \
125131
&& mkdir -p /etc/httpd/conf.d \
126132
&& mkdir -p /etc/httpd/vhost.d \
127133
&& mkdir -p /var/www/default/htdocs \
134+
&& mkdir -p /var/log/httpd \
128135
&& mkdir -p /shared/httpd \
129136
&& chmod 0775 /shared/httpd \
130137
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd
@@ -137,12 +144,20 @@ RUN set -eux \
137144
&& ln -sf /usr/bin/python3 /usr/bin/python
138145

139146

147+
###
148+
### Set timezone
149+
###
150+
RUN set -eux \
151+
&& if [ -f /etc/localtime ]; then rm /etc/localtime; fi \
152+
&& ln -s /usr/share/zoneinfo/UTC /etc/localtime
153+
154+
140155
###
141156
### Copy files
142157
###
143-
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
144-
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
158+
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
145159
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh
160+
146161
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
147162
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
148163

Dockerfiles/Dockerfile.latest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Dockerfile.debian
1+
Dockerfile.alpine

0 commit comments

Comments
 (0)