2017-01-30 01:58:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# @app pluie/alpine-symfony
|
|
|
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
|
|
|
|
2017-03-16 03:35:46 +00:00
|
|
|
if [ ! -z "$CREATE_WWW_DIR" ]; then
|
2017-01-30 01:58:46 +00:00
|
|
|
cd /tmp
|
|
|
|
symfony new app $SYMFONY_VERSION
|
2017-03-16 03:35:46 +00:00
|
|
|
rm -rf /app/web
|
|
|
|
mv -f app/* /app/
|
2017-01-30 01:58:46 +00:00
|
|
|
chown -R 1000:apache /app/
|
2017-03-18 01:16:10 +00:00
|
|
|
chown -R 774:apache /app/var
|
2017-01-30 01:58:46 +00:00
|
|
|
chmod -R g+w /app
|
2017-03-16 03:35:46 +00:00
|
|
|
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
|