docker-images/pluie/alpine-symfony-php7/pre-init.d/10-symfony.sh

16 lines
435 B
Bash
Raw Permalink Normal View History

2017-01-30 01:58:46 +00:00
#!/bin/bash
# @app pluie/alpine-symfony
# @author a-Sansara https://git.pluie.org/pluie/docker-images
if [ ! -z "$CREATE_WWW_DIR" ]; then
2017-01-30 01:58:46 +00:00
cd /tmp
symfony new app $SYMFONY_VERSION
rm -rf /app/web
mv -f app/* /app/
2017-01-30 01:58:46 +00:00
chown -R 1000:apache /app/
chown -R 774:apache /app/var
2017-01-30 01:58:46 +00:00
chmod -R g+w /app
CTN_IP=$(ip route | cut -d ' ' -f3 | head -n1)
sed -i "/::1/s//::1', '$CTN_IP/" /app/web/app_dev.php
2017-01-30 01:58:46 +00:00
fi