This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update builds and instructions to align with AWS ElasticBeanstalk
Add .python-version file set to 3.4.2 to match AWS EB version Updated Docker setup to align more with Elastic Beanstalk by using Amazon AMI base image and running app behind Apache mod_wsgi Updated README for pyenv and removed S3 instructions Update Travis config to set EQ_SECERET_KEY (possible cause of Selenium failures?) Dockerfile based on onsdigital/docker-aws-apache-wsgi:python-3.4.2-onbuild base image
- Loading branch information
1 parent
de378e8
commit e673527
Showing
6 changed files
with
53 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,13 @@ | ||
FROM ubuntu:14.04 | ||
FROM onsdigital/docker-aws-apache-wsgi:python-3.4.2-onbuild | ||
|
||
ENV RUNTIME_PACKAGES="python3 postgresql python-psycopg2" | ||
ENV BUILD_PACKAGES="curl build-essential python3-dev libpq-dev ca-certificates libffi-dev libssl-dev git" | ||
|
||
WORKDIR /code | ||
|
||
EXPOSE 5000 | ||
|
||
RUN apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3 | ||
|
||
RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
|
||
RUN apt-get update && apt-get install -y $RUNTIME_PACKAGES $BUILD_PACKAGES \ | ||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \ | ||
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - | ||
|
||
RUN apt-get install -y nodejs yarn | ||
RUN yarn global add gulp-cli | ||
|
||
ADD requirements.txt /code/requirements.txt | ||
ADD package.json /code/package.json | ||
ADD app/assets /code/app/assets | ||
|
||
RUN pip3 install -U -I -r /code/requirements.txt | ||
|
||
ADD . /code | ||
# Install branched Python Cryptography to fix Apache issue | ||
# TO BE REMOVED ONCE OFFICIAL PACKAGE (1.8?) RELEASED | ||
RUN yum install -y git && \ | ||
pip install -e git+https://github.com/reaperhulk/cryptography.git@password-cb#egg=cryptography | ||
|
||
# Compile frontend | ||
RUN yarn compile | ||
|
||
ENTRYPOINT python3 application.py runserver | ||
# Because eq-survey-runner creates 'eq.log' in the current directory | ||
# it needs write permission as the apache user | ||
RUN chown apache:apache . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters