Generate pages on launch

This commit is contained in:
nemunaire 2014-11-20 22:16:00 +01:00
parent 8e7273fa88
commit 6012021caf
4 changed files with 10 additions and 4 deletions

View File

@ -41,7 +41,7 @@ RUN cd /var/www/fic-server/misc; bash ./CA.sh -newca
RUN service mysql start && echo "CREATE DATABASE fic;" | mysql -u root && cat /var/www/fic-server/db/fic2014.sql | mysql -u root fic
# Uncomment the following line to fill with random values
#RUN cat /var/www/fic-server/db/feed.sql | mysql -u root fic
#RUN service mysql start && cat /var/www/fic-server/db/feed.sql | mysql -u root fic
# Configure site ######################################################
@ -54,4 +54,4 @@ RUN chmod 777 /var/www/fic-server/onyx/cache/ /var/www/fic-server/onyx/cache/tem
# ENVIRONNEMENT #######################################################
EXPOSE 80/tcp 443/tcp
CMD ["sh", "-c", "chown -R www-data:www-data /var/www/fic-server/misc /var/www/fic-server/submission; cd /var/www/fic-server/misc; if ! [ -f server.crt ]; then bash ./CA.sh -newserver; fi; service nginx start && service php5-fpm start && service mysql start && /bin/bash"]
CMD ["sh", "-c", "chown -R www-data:www-data /var/www/fic-server/misc /var/www/fic-server/submission; cd /var/www/fic-server/misc; if ! [ -f server.crt ]; then bash ./CA.sh -newserver; fi; service nginx start && service php5-fpm start && service mysql start && mkdir files && ./gen_hash_link_files.sh files-in files && ./launch_local.sh & /bin/bash"]

View File

@ -1,5 +1,11 @@
#!/bin/bash
if [ $# -lt 2 ]
then
echo "Usage: $0 from to"
exit 1
fi
FROM=`realpath $1`; shift
TO=`realpath $1`; shift

View File

@ -22,7 +22,7 @@ KP1=$!
TMPF=`mktemp`
tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -o ./out &
tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -o ./out ERRORS HOME all DS &
KP2=$!
while ! [ -f /tmp/stop ];

View File

@ -22,7 +22,7 @@ KP1=$!
TMPF=`mktemp`
tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -bt /challenge/ -ba /challenge-admin/ -o ./out &
tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -bt /challenge/ -ba /challenge-admin/ -o ./out ERRORS HOME all DS &
KP2=$!
while ! [ -f /tmp/stop ];