Merge pull request #50 from mozilla/49

Switch back to debian fixes #49
This commit is contained in:
Jared Kerim 2017-05-04 16:08:01 -04:00 коммит произвёл GitHub
Родитель a931bb10b2 df7d0a4d50
Коммит 0c850e27db
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -1,23 +1,26 @@
FROM python:3.6-alpine
RUN addgroup -S app && adduser -S -g app app
FROM python:3.6
ENV PYTHONDONTWRITEBYTECODE 1
RUN groupadd --gid 10001 app && \
useradd --uid 10001 --gid 10001 --home /app --create-home app
WORKDIR /app
EXPOSE 7001
# Wait for the db to initialize
COPY bin/wait-for-it.sh /app/bin/wait-for-it.sh
RUN chmod a+x /app/bin/wait-for-it.sh
RUN chmod +x /app/bin/wait-for-it.sh
# S3 bucket in Cloud Services prod IAM
COPY bin/dumb-init /usr/local/bin/dumb-init
RUN chmod a+x /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
RUN apk add --no-cache gcc musl-dev postgresql-dev postgresql-client bash uwsgi
RUN apt-get update
RUN apt-get install -y postgresql-client
COPY ./requirements.txt /app/requirements.txt
@ -25,7 +28,4 @@ RUN pip install -r requirements.txt --no-cache-dir --disable-pip-version-check
COPY . /app
RUN chown -R app /app
RUN chgrp -R app /app
USER app

Просмотреть файл

@ -48,9 +48,9 @@ wait_for_wrapper()
{
# In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
if [[ $QUIET -eq 1 ]]; then
timeout -t $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
timeout $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
else
timeout -t $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
timeout $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
fi
PID=$!
trap "kill -INT -$PID" INT