Skip to content

Commit 36c416a

Browse files
authored
Merge pull request #55 from devilbox/release-0.49b
Release 0.49b (beta)
2 parents 587e927 + 135847c commit 36c416a

File tree

108 files changed

+6846
-2264
lines changed

Some content is hidden

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

108 files changed

+6846
-2264
lines changed

.github/workflows/docker-compose.yml

+57
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

+3
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

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# vi: ft=dockerfile
12
FROM nginx:stable-alpine
23
MAINTAINER "cytopia" <[email protected]>
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 \
@@ -28,15 +29,6 @@ ENV RUN_DEPS \
2829
supervisor
2930

3031

31-
###
32-
### Runtime arguments
33-
###
34-
ENV MY_USER=nginx
35-
ENV MY_GROUP=nginx
36-
ENV HTTPD_START="/usr/sbin/nginx"
37-
ENV HTTPD_RELOAD="nginx -s stop"
38-
39-
4032
###
4133
### Install required packages
4234
###
@@ -60,14 +52,25 @@ RUN set -eux \
6052
&& chmod +x /usr/bin/cert-gen \
6153
\
6254
# Install watcherd
63-
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \
55+
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/bin/watcherd \
6456
&& chmod +x /usr/bin/watcherd \
6557
\
6658
# Clean-up
6759
&& apk del \
6860
${BUILD_DEPS}
6961

7062

63+
###
64+
### Runtime arguments
65+
###
66+
ENV MY_USER=nginx
67+
ENV MY_GROUP=nginx
68+
ENV HTTPD_START="/usr/sbin/nginx"
69+
ENV HTTPD_RELOAD="nginx -s stop"
70+
ENV HTTPD_VERSION="nginx -V 2>&1 | head -1 | awk '{print \$3}'"
71+
ENV VHOSTGEN_HTTPD_SERVER="nginx"
72+
73+
7174
###
7275
### Create directories
7376
###
@@ -78,6 +81,7 @@ RUN set -eux \
7881
&& mkdir -p /etc/httpd/conf.d \
7982
&& mkdir -p /etc/httpd/vhost.d \
8083
&& mkdir -p /var/www/default/htdocs \
84+
&& mkdir -p /var/log/httpd \
8185
&& mkdir -p /shared/httpd \
8286
&& chmod 0775 /shared/httpd \
8387
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd
@@ -90,14 +94,22 @@ RUN set -eux \
9094
&& ln -sf /usr/bin/python3 /usr/bin/python
9195

9296

97+
###
98+
### Set timezone
99+
###
100+
RUN set -eux \
101+
&& if [ -f /etc/localtime ]; then rm /etc/localtime; fi \
102+
&& ln -s /usr/share/zoneinfo/UTC /etc/localtime
103+
104+
93105
###
94106
### Copy files
95107
###
96108
COPY ./data/nginx/nginx.conf /etc/nginx/nginx.conf
97-
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
98-
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
109+
99110
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
100111
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh
112+
101113
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
102114
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
103115

Dockerfiles/Dockerfile.debian

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# vi: ft=dockerfile
12
FROM nginx:stable
23
MAINTAINER "cytopia" <[email protected]>
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=nginx
32-
ENV MY_GROUP=nginx
33-
ENV HTTPD_START="/usr/sbin/nginx"
34-
ENV HTTPD_RELOAD="nginx -s 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
@@ -67,6 +59,17 @@ RUN set -eux \
6759
&& rm -rf /var/lib/apt/lists/*
6860

6961

62+
###
63+
### Runtime arguments
64+
###
65+
ENV MY_USER=nginx
66+
ENV MY_GROUP=nginx
67+
ENV HTTPD_START="/usr/sbin/nginx"
68+
ENV HTTPD_RELOAD="nginx -s stop"
69+
ENV HTTPD_VERSION="nginx -V 2>&1 | head -1 | awk '{print \$3}'"
70+
ENV VHOSTGEN_HTTPD_SERVER="nginx"
71+
72+
7073
###
7174
### Create directories
7275
###
@@ -77,6 +80,7 @@ RUN set -eux \
7780
&& mkdir -p /etc/httpd/conf.d \
7881
&& mkdir -p /etc/httpd/vhost.d \
7982
&& mkdir -p /var/www/default/htdocs \
83+
&& mkdir -p /var/log/httpd \
8084
&& mkdir -p /shared/httpd \
8185
&& chmod 0775 /shared/httpd \
8286
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd
@@ -89,14 +93,22 @@ RUN set -eux \
8993
&& ln -sf /usr/bin/python3 /usr/bin/python
9094

9195

96+
###
97+
### Set timezone
98+
###
99+
RUN set -eux \
100+
&& if [ -f /etc/localtime ]; then rm /etc/localtime; fi \
101+
&& ln -s /usr/share/zoneinfo/UTC /etc/localtime
102+
103+
92104
###
93105
### Copy files
94106
###
95107
COPY ./data/nginx/nginx.conf /etc/nginx/nginx.conf
96-
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
97-
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
108+
98109
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
99110
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh
111+
100112
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
101113
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
102114

Dockerfiles/Dockerfile.latest

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Dockerfile.debian
1+
Dockerfile.alpine

0 commit comments

Comments
 (0)