diff --git a/Dockerfile b/Dockerfile index 79a701d..b377576 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,4 +48,5 @@ RUN a2ensite re2o # HERE WE GO FROM re2o_apache as re2o -CMD service apache2 stop && python3 manage.py migrate && python3 manage.py collectstatic --noinput && python3 manage.py compilemessages && service apache2 start && sleep infinity +COPY ./re2o-dev.sh /var/www/re2o/ +CMD bash re2o-dev.sh diff --git a/README.md b/README.md index 57a645b..03338b0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is simply a docker environment to dev re2o locally. To use it : * clone Re2o; -* copy `Dockerfile` and `docker-compose.yml` into the cloned directory; +* copy `Dockerfile`, `re2o-dev.sh` and `docker-compose.yml` into the cloned directory; * copy `settings_local.py` into the `re2o` folder in the cloned directory; * run `docker-compose up` diff --git a/re2o-dev.sh b/re2o-dev.sh new file mode 100644 index 0000000..fdbc18c --- /dev/null +++ b/re2o-dev.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +service apache2 stop +python3 manage.py migrate +python3 manage.py collectstatic --noinput +python3 manage.py compilemessages +service apache2 start +service slapd start +sleep infinity