Browse Source

proxy Dockerfile

pull/3/head
François 2 years ago
parent
commit
0936f1da0d
  1. 4
      dockers/garradin/config/config.local.tmpl.php
  2. 28
      dockers/proxy/Dockerfile
  3. 11
      dockers/proxy/build.sh

4
dockers/garradin/config/config.local.tmpl.php

@ -37,10 +37,10 @@ const PLUGINS_ROOT = DATA_ROOT . '/plugins';
define('Garradin\WWW_URL', "__HTTP_PROTO__://".$user."-garradin.__DOMAIN__/");
// Désactiver le log des erreurs visible dans l'interface (sécurité)
define('Garradin\ERRORS_ENABLE_LOG_VIEW', false);
define('Garradin\ERRORS_ENABLE_LOG_VIEW', true);
// Ne pas afficher les erreurs de code
define('Garradin\SHOW_ERRORS', false);
define('Garradin\SHOW_ERRORS', true);
// Envoyer les erreurs par mail à cette adresse
define('Garradin\MAIL_ERRORS', 'garradin@kaz.bzh');

28
dockers/proxy/Dockerfile

@ -0,0 +1,28 @@
FROM nginx
########################################
# APT local cache
# work around because COPY failed if no source file
COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] /
RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true
RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \
-e "s/deb.debian.org/${APT_MIRROR_DEBIAN}/g" \
-e "s/security.debian.org/${APT_MIRROR_DEBIAN_SECURITY}/g" \
-e "s/archive.ubuntu.com/${APT_MIRROR_UBUNTU}/g" \
-e "s/security.ubuntu.com/${APT_MIRROR_UBUNTU_SECURITY}/g" \
/etc/apt/sources.list; fi
########################################
RUN apt-get update --quiet && apt-get upgrade -y
RUN apt-get install -y snapd
# XXX après il y a une erreur
# error: cannot communicate with server: Post http://localhost/v2/snaps/core: dial unix /run/snapd.socket: connect: no such file or directory
#RUN snap install core
#RUN snap refresh core
#RUN snap install --classic certbot
#RUN ln -s /snap/bin/certbot /usr/bin/certbot
#RUN snap set certbot trust-plugin-with-root=ok

11
dockers/proxy/build.sh

@ -0,0 +1,11 @@
#!/bin/bash
KAZ_ROOT=$(cd "$(dirname $0)/../.."; pwd)
. "${KAZ_ROOT}/bin/.commonFunctions.sh"
setKazVars
printKazMsg "\n *** Création du Dockerfile proxy"
cd "${KAZ_ROOT}"
docker build -t proxykaz . -f dockers/proxy/Dockerfile
Loading…
Cancel
Save