Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.49b (beta) #53

Merged
merged 34 commits into from
Dec 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c48a8a8
Use alpine as default
cytopia Dec 22, 2022
106c799
Update .gitignore
cytopia Dec 22, 2022
3775220
Add Docker Compose workflow
cytopia Dec 22, 2022
9ff345c
Update Makefile
cytopia Dec 22, 2022
3a88010
Stash docs
cytopia Dec 22, 2022
d38031c
Fix docs
cytopia Dec 22, 2022
99fc7e2
doc: cleanup
cytopia Dec 22, 2022
c64de75
Add examples/
cytopia Dec 22, 2022
e704540
Fix examples
cytopia Dec 22, 2022
7369d06
Add tests
cytopia Dec 22, 2022
e64d69b
Update README
cytopia Dec 22, 2022
0fc8eaf
Update Dockerfiles/data
cytopia Dec 22, 2022
260e121
Fix Readme tags
cytopia Dec 22, 2022
6ac8cd4
Fix errors
cytopia Dec 22, 2022
f668657
Fix workflow runs
cytopia Dec 22, 2022
cdda1fa
Set Default ARG in Dockerfile
cytopia Dec 22, 2022
ce06910
Add additional arches
cytopia Dec 22, 2022
c6ed256
Revert adding arches
cytopia Dec 22, 2022
6dccbd5
Fix bug in reverse proxy generation
cytopia Dec 22, 2022
a689806
Integration test for reverse proxy
cytopia Dec 22, 2022
b067b4a
Fix Reverse Proxy issue
cytopia Dec 22, 2022
a0ec9cb
Exclude i386 from NodeJS tests
cytopia Dec 22, 2022
4f99533
Fix error check
cytopia Dec 22, 2022
82130e7
Fix unsuported filter in Apache 2.2
cytopia Dec 22, 2022
a091938
Fix tests
cytopia Dec 22, 2022
1791bc4
Fix tests
cytopia Dec 22, 2022
987eecc
Add Mass vhost reverse proxy test
cytopia Dec 23, 2022
2623925
Update vhost-gen
cytopia Dec 23, 2022
7fe725b
Update Tests
cytopia Dec 23, 2022
b43d46f
Fix mass vhost tests
cytopia Dec 23, 2022
18ddab2
Fixup docs
cytopia Dec 23, 2022
a7fa527
Disable HTTP/2 for Apache 2.2
cytopia Dec 23, 2022
a874632
Supervisord logging
cytopia Dec 23, 2022
ac28cce
Fix wrong else case
cytopia Dec 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---

# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: docker-compose


# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
pull_request:
paths:
- '.github/workflows/docker-compose.yml'
- 'Dockerfiles/**'
- 'examples/**/docker-compose.yml'
- 'examples/**/integration-test.sh'
- 'examples/integration-test.sh'


jobs:
docker-compose:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: 'docker-compose: main-vhost Static Files'
run: |
cd ./examples/default-vhost__static-files/
./integration-test.sh

- name: 'docker-compose: main-vhost PHP-FPM'
run: |
cd ./examples/default-vhost__php-fpm/
./integration-test.sh

- name: 'docker-compose: main-vhost PHP-FPM (SSL)'
run: |
cd ./examples/default-vhost__php-fpm__ssl/
./integration-test.sh

- name: 'docker-compose: main-vhost Reverse Proxy (NodeJS)'
run: |
cd ./examples/default-vhost__reverse-proxy__node/
./integration-test.sh

- name: 'docker-compose: mass-vhost PHP-FPM (SSL)'
run: |
cd ./examples/mass-vhost__php-fpm__ssl/
./integration-test.sh

- name: 'docker-compose: mass-vhost Reverse Proxy (SSL)'
run: |
cd ./examples/mass-vhost__reverse-proxy__ssl/
./integration-test.sh
4 changes: 2 additions & 2 deletions .github/workflows/params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ env:
{
"NAME": "Apache",
"VERSION": ["2.2"],
"FLAVOUR": ["latest", "debian"],
"FLAVOUR": ["debian"],
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6"]
},
{
"NAME": "Apache",
"VERSION": ["2.2"],
"FLAVOUR": ["alpine"],
"FLAVOUR": ["latest", "alpine"],
"ARCH": ["linux/amd64"]
}
]
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Makefile.docker
Makefile.lint
devilbox-ca.crt
devilbox-ca.key
devilbox-ca.srl
51 changes: 36 additions & 15 deletions Dockerfiles/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# vi: ft=dockerfile
FROM alpine:3.5 as builder

RUN set -eux \
Expand All @@ -17,10 +18,10 @@ LABEL \
###
### Build arguments
###
ARG VHOST_GEN_GIT_REF=1.0.3
ARG WATCHERD_GIT_REF=v1.0.2
ARG CERT_GEN_GIT_REF=0.7
ARG ARCH
ARG VHOST_GEN_GIT_REF=1.0.8
ARG WATCHERD_GIT_REF=v1.0.7
ARG CERT_GEN_GIT_REF=0.10
ARG ARCH=linux/amd64

ENV BUILD_DEPS \
autoconf \
Expand All @@ -39,14 +40,6 @@ ENV RUN_DEPS \
tzdata


###
### Runtime arguments
###
ENV MY_USER=daemon
ENV MY_GROUP=daemon
ENV HTTPD_START="httpd-foreground"
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"

###
### Install required packages
###
Expand Down Expand Up @@ -87,7 +80,7 @@ RUN set -eux \
&& chmod +x /usr/bin/cert-gen \
\
# Install watcherd
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/bin/watcherd \
&& chmod +x /usr/bin/watcherd \
\
# Clean-up
Expand Down Expand Up @@ -125,6 +118,17 @@ RUN set -eux \
) >> /usr/local/apache2/conf/httpd.conf


###
### Runtime arguments
###
ENV MY_USER=daemon
ENV MY_GROUP=daemon
ENV HTTPD_START="httpd-foreground"
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"
ENV HTTPD_VERSION="httpd -V 2>&1 | head -1 | awk '{print \$3}'"
ENV VHOSTGEN_HTTPD_SERVER="apache22"


###
### Create directories
###
Expand All @@ -133,21 +137,38 @@ RUN set -eux \
&& mkdir -p /etc/httpd/conf.d \
&& mkdir -p /etc/httpd/vhost.d \
&& mkdir -p /var/www/default/htdocs \
&& mkdir -p /var/log/httpd \
&& mkdir -p /shared/httpd \
&& chmod 0775 /shared/httpd \
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd


###
### Symlink Python3 to Python
###
RUN set -eux \
&& ln -sf /usr/bin/python2 /usr/bin/python


###
### Set timezone
###
RUN set -eux \
&& if [ -f /etc/localtime ]; then rm /etc/localtime; fi \
&& ln -s /usr/share/zoneinfo/UTC /etc/localtime


###
### Copy files
###
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh

COPY ./data/docker-entrypoint.d /docker-entrypoint.d
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh



###
### Backporting from Alpine 3.5
###
Expand Down
50 changes: 35 additions & 15 deletions Dockerfiles/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# vi: ft=dockerfile
FROM httpd:2.2
MAINTAINER "cytopia" <[email protected]>

Expand All @@ -11,10 +12,10 @@ LABEL \
###
### Build arguments
###
ARG VHOST_GEN_GIT_REF=1.0.3
ARG WATCHERD_GIT_REF=v1.0.2
ARG CERT_GEN_GIT_REF=0.7
ARG ARCH
ARG VHOST_GEN_GIT_REF=1.0.8
ARG WATCHERD_GIT_REF=v1.0.7
ARG CERT_GEN_GIT_REF=0.10
ARG ARCH=linux/amd64

ENV BUILD_DEPS \
autoconf \
Expand All @@ -28,14 +29,6 @@ ENV RUN_DEPS \
supervisor


###
### Runtime arguments
###
ENV MY_USER=daemon
ENV MY_GROUP=daemon
ENV HTTPD_START="httpd-foreground"
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"

###
### Install required packages
###
Expand Down Expand Up @@ -82,7 +75,7 @@ RUN set -eux \
&& chmod +x /usr/bin/cert-gen \
\
# Install watcherd
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/bin/watcherd \
&& chmod +x /usr/bin/watcherd \
\
# Clean-up
Expand Down Expand Up @@ -121,6 +114,17 @@ RUN set -eux \
) >> /usr/local/apache2/conf/httpd.conf


###
### Runtime arguments
###
ENV MY_USER=daemon
ENV MY_GROUP=daemon
ENV HTTPD_START="httpd-foreground"
ENV HTTPD_RELOAD="/usr/local/apache2/bin/httpd -k stop"
ENV HTTPD_VERSION="httpd -V 2>&1 | head -1 | awk '{print \$3}'"
ENV VHOSTGEN_HTTPD_SERVER="apache22"


###
### Create directories
###
Expand All @@ -129,17 +133,33 @@ RUN set -eux \
&& mkdir -p /etc/httpd/conf.d \
&& mkdir -p /etc/httpd/vhost.d \
&& mkdir -p /var/www/default/htdocs \
&& mkdir -p /var/log/httpd \
&& mkdir -p /shared/httpd \
&& chmod 0775 /shared/httpd \
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd


###
### Symlink Python3 to Python
###
RUN set -eux \
&& ln -sf /usr/bin/python2 /usr/bin/python


###
### Set timezone
###
RUN set -eux \
&& if [ -f /etc/localtime ]; then rm /etc/localtime; fi \
&& ln -s /usr/share/zoneinfo/UTC /etc/localtime


###
### Copy files
###
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh

COPY ./data/docker-entrypoint.d /docker-entrypoint.d
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.latest
Loading