Merge pull request #2763 from ecordell/fix-conf
Copy conf after startup
This commit is contained in:
commit
9780c82a85
3 changed files with 23 additions and 13 deletions
33
Dockerfile
33
Dockerfile
|
@ -3,13 +3,8 @@
|
||||||
FROM quay.io/quay/quay-base:latest
|
FROM quay.io/quay/quay-base:latest
|
||||||
|
|
||||||
WORKDIR $QUAYDIR
|
WORKDIR $QUAYDIR
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Install python dependencies
|
COPY requirements.txt requirements-tests.txt ./
|
||||||
RUN virtualenv --distribute venv \
|
|
||||||
&& venv/bin/pip install -r requirements.txt \
|
|
||||||
&& venv/bin/pip install -r requirements-tests.txt \
|
|
||||||
&& venv/bin/pip freeze
|
|
||||||
|
|
||||||
# Check python dependencies for the GPL
|
# Check python dependencies for the GPL
|
||||||
# Due to the following bug, pip results must be piped to a file before grepping:
|
# Due to the following bug, pip results must be piped to a file before grepping:
|
||||||
|
@ -18,11 +13,24 @@ RUN cat requirements.txt | grep -v "^-e" | awk -F'==' '{print $1}' | xargs venv/
|
||||||
test -z $(cat pipinfo.txt | grep GPL | grep -v LGPL) && \
|
test -z $(cat pipinfo.txt | grep GPL | grep -v LGPL) && \
|
||||||
rm pipinfo.txt
|
rm pipinfo.txt
|
||||||
|
|
||||||
# Install front-end dependencies and Optimize our images
|
RUN virtualenv --distribute venv \
|
||||||
RUN yarn install --ignore-engines \
|
&& venv/bin/pip install -r requirements.txt \
|
||||||
&& yarn build \
|
&& venv/bin/pip install -r requirements-tests.txt \
|
||||||
&& jpegoptim static/img/**/*.jpg \
|
&& venv/bin/pip freeze
|
||||||
&& optipng -clobber -quiet static/img/**/*.png
|
|
||||||
|
# Install front-end dependencies
|
||||||
|
# JS depedencies
|
||||||
|
COPY yarn.lock ./
|
||||||
|
RUN yarn install --ignore-engines
|
||||||
|
|
||||||
|
# JS compile
|
||||||
|
COPY static static
|
||||||
|
COPY package.json tsconfig.json webpack.config.js tslint.json ./
|
||||||
|
RUN yarn build \
|
||||||
|
&& jpegoptim static/img/**/*.jpg \
|
||||||
|
&& optipng -clobber -quiet static/img/**/*.png
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
# Set up the init system
|
# Set up the init system
|
||||||
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit static/fonts static/ldn /usr/local/nginx/logs/ \
|
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit static/fonts static/ldn /usr/local/nginx/logs/ \
|
||||||
|
@ -36,11 +44,12 @@ RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit static/fon
|
||||||
&& cp .git/HEAD GIT_HEAD \
|
&& cp .git/HEAD GIT_HEAD \
|
||||||
&& rm -rf /etc/service/syslog-forwarder
|
&& rm -rf /etc/service/syslog-forwarder
|
||||||
|
|
||||||
|
RUN ln -s $QUAYCONF /conf
|
||||||
|
|
||||||
# Cleanup any NPM-related stuff.
|
# Cleanup any NPM-related stuff.
|
||||||
# RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev libffi-dev libgpgme11-dev nodejs jpegoptim optipng w3m \
|
# RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev libffi-dev libgpgme11-dev nodejs jpegoptim optipng w3m \
|
||||||
# && apt-get autoremove -y \
|
# && apt-get autoremove -y \
|
||||||
# && apt-get clean
|
# && apt-get clean
|
||||||
# && rm -rf /root/.npm /.npm /usr/local/lib/node_modules /usr/share/yarn/node_modules \
|
# && rm -rf /root/.npm /.npm /usr/local/lib/node_modules /usr/share/yarn/node_modules \
|
||||||
# /root/node_modules /node_modules /grunt
|
# /root/node_modules /node_modules /grunt
|
||||||
RUN ln -s /conf $QUAYCONF
|
|
||||||
RUN PYTHONPATH=$QUAYPATH venv/bin/alembic heads | grep -E '^[0-9a-f]+ \(head\)$' > ALEMBIC_HEAD
|
RUN PYTHONPATH=$QUAYPATH venv/bin/alembic heads | grep -E '^[0-9a-f]+ \(head\)$' > ALEMBIC_HEAD
|
||||||
|
|
|
@ -4,6 +4,7 @@ QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
|
||||||
|
|
||||||
cd ${QUAYDIR:-"/"}
|
cd ${QUAYDIR:-"/"}
|
||||||
|
|
||||||
|
|
||||||
if [ -e $QUAYCONF/stack/robots.txt ]
|
if [ -e $QUAYCONF/stack/robots.txt ]
|
||||||
then
|
then
|
||||||
cp $QUAYCONF/stack/robots.txt $QUAYPATH/templates/robots.txt
|
cp $QUAYCONF/stack/robots.txt $QUAYPATH/templates/robots.txt
|
||||||
|
|
|
@ -98,6 +98,6 @@ COPY external_libraries.py _init.py ./
|
||||||
RUN venv/bin/python -m external_libraries
|
RUN venv/bin/python -m external_libraries
|
||||||
|
|
||||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache
|
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache
|
||||||
VOLUME ["$QUAYCONF/stack", "/conf/stack", "/conf/etcd", "/var/log", "/datastorage", "/tmp", "$QUAYCONF/etcd"]
|
VOLUME ["/var/log", "/datastorage", "/tmp"]
|
||||||
|
|
||||||
EXPOSE 443 8443 80
|
EXPOSE 443 8443 80
|
||||||
|
|
Reference in a new issue