tls support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mauro Torrez 2019-10-12 00:11:32 -03:00
parent a76ad6f775
commit eb11b1311c
5 changed files with 45 additions and 10 deletions

View File

@ -37,6 +37,7 @@ RUN set -ex; \
php-xml \
php-mbstring \
php-curl \
ssl-cert \
; \
\
rm -rf /var/lib/apt/lists/*
@ -101,13 +102,19 @@ RUN \
touch /var/www/html/index.php /var/www/html/index.php.remove; \
} \
&& unitd --control unix:/var/run/control.unit.sock \
&& cat /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key | \
curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock \
http://localhost/certificates/default \
&& curl -X PUT --data-binary \
'{ \
"listeners": { \
"*:9000": { "pass": "routes/main" }, \
"*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
"*:9003": { "pass": "routes/direct" }, \
"*:9011": { "pass": "routes/dynamic", "tls": { "certificate": "default" } }, \
"*:9012": { "pass": "routes/static", "tls": { "certificate": "default" } }, \
"*:9013": { "pass": "routes/direct", "tls": { "certificate": "default" } } \
}, \
"routes": { \
"main": [ \
@ -159,7 +166,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \
}
EXPOSE 9000 9001 9002 9003
EXPOSE 9000 9001 9002 9003 9011 9012 9013
ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -37,6 +37,7 @@ RUN set -ex; \
php-xml \
php-mbstring \
php-curl \
ssl-cert \
; \
\
rm -rf /var/lib/apt/lists/*
@ -101,13 +102,19 @@ RUN \
touch /var/www/html/index.php /var/www/html/index.php.remove; \
} \
&& unitd --control unix:/var/run/control.unit.sock \
&& cat /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key | \
curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock \
http://localhost/certificates/default \
&& curl -X PUT --data-binary \
'{ \
"listeners": { \
"*:9000": { "pass": "routes/main" }, \
"*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
"*:9003": { "pass": "routes/direct" }, \
"*:9011": { "pass": "routes/dynamic", "tls": { "certificate": "default" } }, \
"*:9012": { "pass": "routes/static", "tls": { "certificate": "default" } }, \
"*:9013": { "pass": "routes/direct", "tls": { "certificate": "default" } } \
}, \
"routes": { \
"main": [ \
@ -159,7 +166,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \
}
EXPOSE 9000 9001 9002 9003
EXPOSE 9000 9001 9002 9003 9011 9012 9013
ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -37,6 +37,7 @@ RUN set -ex; \
php-xml \
php-mbstring \
php-curl \
ssl-cert \
; \
\
rm -rf /var/lib/apt/lists/*
@ -101,13 +102,19 @@ RUN \
touch /var/www/html/index.php /var/www/html/index.php.remove; \
} \
&& unitd --control unix:/var/run/control.unit.sock \
&& cat /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key | \
curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock \
http://localhost/certificates/default \
&& curl -X PUT --data-binary \
'{ \
"listeners": { \
"*:9000": { "pass": "routes/main" }, \
"*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
"*:9003": { "pass": "routes/direct" }, \
"*:9011": { "pass": "routes/dynamic", "tls": { "certificate": "default" } }, \
"*:9012": { "pass": "routes/static", "tls": { "certificate": "default" } }, \
"*:9013": { "pass": "routes/direct", "tls": { "certificate": "default" } } \
}, \
"routes": { \
"main": [ \
@ -159,7 +166,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \
}
EXPOSE 9000 9001 9002 9003
EXPOSE 9000 9001 9002 9003 9011 9012 9013
ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -37,6 +37,7 @@ RUN set -ex; \
php-xml \
php-mbstring \
php-curl \
ssl-cert \
; \
\
rm -rf /var/lib/apt/lists/*
@ -101,13 +102,19 @@ RUN \
touch /var/www/html/index.php /var/www/html/index.php.remove; \
} \
&& unitd --control unix:/var/run/control.unit.sock \
&& cat /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key | \
curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock \
http://localhost/certificates/default \
&& curl -X PUT --data-binary \
'{ \
"listeners": { \
"*:9000": { "pass": "routes/main" }, \
"*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
"*:9003": { "pass": "routes/direct" }, \
"*:9011": { "pass": "routes/dynamic", "tls": { "certificate": "default" } }, \
"*:9012": { "pass": "routes/static", "tls": { "certificate": "default" } }, \
"*:9013": { "pass": "routes/direct", "tls": { "certificate": "default" } } \
}, \
"routes": { \
"main": [ \
@ -159,7 +166,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \
}
EXPOSE 9000 9001 9002 9003
EXPOSE 9000 9001 9002 9003 9011 9012 9013
ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -36,6 +36,7 @@ RUN set -ex; \
php-xml \
php-mbstring \
php-curl \
ssl-cert \
; \
\
rm -rf /var/lib/apt/lists/*
@ -100,13 +101,19 @@ RUN \
touch /var/www/html/index.php /var/www/html/index.php.remove; \
} \
&& unitd --control unix:/var/run/control.unit.sock \
&& cat /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key | \
curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock \
http://localhost/certificates/default \
&& curl -X PUT --data-binary \
'{ \
"listeners": { \
"*:9000": { "pass": "routes/main" }, \
"*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
"*:9003": { "pass": "routes/direct" }, \
"*:9011": { "pass": "routes/dynamic", "tls": { "certificate": "default" } }, \
"*:9012": { "pass": "routes/static", "tls": { "certificate": "default" } }, \
"*:9013": { "pass": "routes/direct", "tls": { "certificate": "default" } } \
}, \
"routes": { \
"main": [ \
@ -158,7 +165,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \
}
EXPOSE 9000 9001 9002 9003
EXPOSE 9000 9001 9002 9003 9011 9012 9013
ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]