Commit f9a16548 authored by Sebastien's avatar Sebastien

Run locally

parent b36ba1ed
......@@ -21,19 +21,14 @@ WORKDIR $ROOTDIR
RUN chown -R www-data.www-data $ROOTDIR
RUN a2enmod rewrite
RUN a2enmod cgi
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN cp $ROOTDIR/site/cfg/site-docker.cfg $ROOTDIR/site/cfg/site.cfg
RUN cp $ROOTDIR/site/cfg/authentication-docker.cfg $ROOTDIR/site/cfg/authentication.cfg
RUN export USER=root && ./bin/int/admin_install.pl --docker
RUN cp $ROOTDIR/site/cfg/apache-docker.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite && \
a2enmod cgi && \
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
cp $ROOTDIR/site/cfg/site-docker.cfg $ROOTDIR/site/cfg/site.cfg && \
cp $ROOTDIR/site/cfg/authentication-docker.cfg $ROOTDIR/site/cfg/authentication.cfg && \
export USER=root && ./bin/int/admin_install.pl --docker && \
cp $ROOTDIR/site/cfg/apache-docker.conf /etc/apache2/sites-available/000-default.conf
WORKDIR $ROOTDIR/site
CMD ["sh","-c","service apache2 start && /bin/bash && export USER=root"]
......@@ -141,6 +141,10 @@ From the host server (need Apache::Htpasswd module):
### RUN APP ###
:information_source: Run locally (guest/guest, no mail):
$FC/run.sh --local
:information_source: To start Docker image in interactive mode run:
$FC/run.sh --login
......
......@@ -2,8 +2,25 @@
error=0;
login=$1;
args=$@;
login=0;
local=0;
if [[ "$args" =~ (-login) ]]
then
login=1;
fi
if [[ "$args" =~ (-local) ]]
then
local=1;
FC_ADMIN='guest'
FC_SMTP='local'
FC_PORT='1977'
FC_HOSTNAME='localhost'
FC_DIR="$HOME/.family-companion"
fi
echo -e "\e[1m\e[100m";
......@@ -54,7 +71,7 @@ echo -e "portal_port=$FC_PORT\n" >> $FC_DIR/data/cfg/env.cfg;
if [ $error -ne 1 ]
then
interactive=' -d ';
if [[ "$login" =~ (-login)$ ]]
if [ $login -eq 1 ]
then
interactive=' -i ';
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment