start.sh 448 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. set -eu
  3. mkdir -p /app/data/public
  4. if [ ! -f "/app/data/public/index.html" ]; then
  5. cp /app/code/index.html /app/data/public/index.html
  6. fi
  7. if [ ! -f "/app/data/apache2-app.conf" ]; then
  8. cp /app/code/apache2-app.conf /app/data/apache2-app.conf
  9. fi
  10. chown -R www-data:www-data /app/data /run/app
  11. echo "Starting apache"
  12. APACHE_CONFDIR="" source /etc/apache2/envvars
  13. rm -f "${APACHE_PID_FILE}"
  14. exec /usr/sbin/apache2 -DFOREGROUND