Aucune description

entrypoint.sh 1.4KB

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. # IRIS Source Code
  3. # Copyright (C) 2021 - Airbus CyberSecurity (SAS)
  4. # ir@cyberactionlab.net
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU Lesser General Public
  8. # License as published by the Free Software Foundation; either
  9. # version 3 of the License, or (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # Lesser General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Lesser General Public License
  17. # along with this program; if not, write to the Free Software Foundation,
  18. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. set -e
  20. # envsubst will make a substitution on every $variable in a file, since the nginx file contains nginx variable like $host, we have to limit the substitution to this set
  21. # otherwise, each nginx variable will be replaced by an empty string
  22. envsubst '${INTERFACE_HTTPS_PORT} ${IRIS_UPSTREAM_SERVER} ${IRIS_UPSTREAM_PORT} ${SERVER_NAME} ${KEY_FILENAME} ${CERT_FILENAME} ${IRIS_FRONTEND_SERVER} ${IRIS_FRONTEND_PORT}' < /etc/nginx/nginx.conf > /tmp/nginx.conf
  23. cp /tmp/nginx.conf /etc/nginx/nginx.conf
  24. rm /tmp/nginx.conf
  25. exec nginx -g "daemon off;"