Commit 2aafab2e authored by BAIRE Anthony's avatar BAIRE Anthony

move shell commands into a shell script (setup.sh)

it's easier to read and easier to comment
parent 07b64ad2
......@@ -16,18 +16,8 @@ RUN apt-getq update && apt-getq install mysql-server default-libmysqlclient-dev
COPY requirements.txt /tmp/
RUN cd /tmp && pip3 install -r requirements.txt && rm requirements.txt
COPY . /opt/allgo
# apply patches in setup/patches/
# install all files in setup/files/ (but using symbolic links to ease the
# development)
RUN apply-patches /opt/allgo/setup/patches/*.diff &&\
cd /opt/allgo/setup/files &&\
find * \! -type d | while read path ; do \
mkdir -p -- "`dirname -- "$path"`" && rm -f -- "/$path" &&\
ln -s "$PWD/$path" "/$path" ;\
done
RUN sh /opt/allgo/setup/setup.sh
WORKDIR /opt/allgo
LABEL dk.migrate_always=1
......
#!/bin/sh
set -e -x
# make /run world writable (so that the container cae be run under any uid)
chown -R nobody /run
chmod -R a+rwX /run
# apply patches in setup/patches/
apply-patches /opt/allgo/setup/patches/*.diff
# remove nginx default site
rm /etc/nginx/sites-enabled/default
# install all files in setup/files/
# (but using symbolic links to ease the development)
(cd /opt/allgo/setup/files && find * \! -type d | while read path ; do
mkdir -p -- "`dirname -- "$path"`"
rm -f -- "/$path"
ln -s "$PWD/$path" "/$path"
done)
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