Skip to content

Commit

Permalink
Merge pull request #118 from effective-altruism-australia/master
Browse files Browse the repository at this point in the history
Bring dev changes into live branch
  • Loading branch information
nathansherburn authored Jun 28, 2024
2 parents 13dfd11 + e62975e commit c179860
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 40 deletions.
55 changes: 55 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# For local development and testing only.

FROM ubuntu:16.04

# Install OS level dependencies
RUN apt-get update && apt-get install -y \
python \
python-pip \
build-essential \
libssl-dev \
libffi-dev \
python-dev \
wkhtmltopdf \
xauth \
xvfb \
postgresql \
libpq-dev \
redis-server \
git \
curl \
vim

# Start PostgreSQL, set a password and create eaa database
USER postgres
RUN service postgresql start && \
psql -c "ALTER USER postgres PASSWORD 'password';" && \
psql -c "CREATE DATABASE eaa;"
USER root

# Upgrade pip to the last version that supports Python 2.7 and install the last
# version of virtualenv that works for Python 2.7
RUN pip install --upgrade "pip<21.0" && \
pip install virtualenv==16.7.10

# Set the working directory
WORKDIR /usr/src/app

# Copy over all the files from this repo
COPY . .

# Install nvm and node
ENV NVM_DIR /usr/src/app/.nvm
RUN mkdir $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
. $NVM_DIR/nvm.sh && nvm install 8.14.0

# Create and activate a Python virtual environment and install the dependencies
RUN virtualenv donation_portal_env && \
. donation_portal_env/bin/activate && \
pip install -r deps/pip.base && \
pip install -r deps/pip

# Document that the service listens on port 8000. Note, this doesn't actually
# open the port - you'll need to run `docker run -p 8000:8000 <image name>`.
EXPOSE 8000
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ and https://github.com/effective-altruism-australia/donation_portal/blob/live/do

## Example data

To add some example data: `./manage.py loaddata example-data`

To add some example data: `./manage.py loaddata example-data`
2 changes: 1 addition & 1 deletion deps/pip
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pytest==4.0.1
python-dateutil==2.6.0
python-postmark==0.4.12
pytz==2016.10
pyxero==0.8.0
pyxero==0.9.3
q==2.6
raven==5.32.0
redis==2.10.5
Expand Down
2 changes: 2 additions & 0 deletions donation_portal/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,6 @@
}
} }

PIN_ENVIRONMENTS = {"dummy"}

# vim: cc=80 tw=79 ts=4 sw=4 sts=4 et sr
74 changes: 37 additions & 37 deletions react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"card-validator": "^5.0.0",
"classnames": "^2.2.5",
"card-validator": "5.0.0",
"classnames": "2.2.5",
"e": "0.0.4",
"json-loader": "^0.5.7",
"moment": "^2.22.1",
"moment-duration-format": "^2.2.2",
"prop-types": "^15.6.1",
"react": "^16.2.0",
"react-datepicker": "^1.4.1",
"react-dom": "^16.2.0",
"react-ga": "^2.5.7",
"react-radio-group": "^3.0.2",
"react-redux": "^5.0.7",
"json-loader": "0.5.7",
"moment": "2.22.1",
"moment-duration-format": "2.2.2",
"prop-types": "15.6.1",
"react": "16.2.0",
"react-datepicker": "1.4.1",
"react-dom": "16.2.0",
"react-ga": "2.5.7",
"react-radio-group": "3.0.2",
"react-redux": "5.0.7",
"react-scripts": "1.1.1",
"react-select": "^1.2.1",
"reactstrap": "^5.0.0",
"redux": "^4.0.0",
"redux-form": "^7.3.0",
"underscore": "^1.8.3"
"react-select": "1.2.1",
"reactstrap": "5.0.0",
"redux": "4.0.0",
"redux-form": "7.3.0",
"underscore": "1.8.3"
},
"scripts": {
"build": "webpack --config config/webpack.config.js",
Expand All @@ -30,25 +30,25 @@
"eject": "react-scripts eject"
},
"devDependencies": {
"babel-jest": "^22.4.3",
"babel-loader": "^7.1.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"eslint": "^3.14.0",
"eslint-config-google": "^0.9.1",
"eslint-config-react-app": "^0.5.0",
"eslint-loader": "^1.6.1",
"eslint-plugin-flowtype": "^2.30.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.9.0",
"iterators-polyfill": "^1.0.2",
"jest": "^22.4.3",
"react-test-renderer": "^16.3.2",
"webpack": "^1.15.0",
"webpack-bundle-tracker": "^0.2.1",
"webpack-cleanup-plugin": "^0.4.2",
"webpack-dev-server": "^1.16.2",
"webpack-manifest-plugin": "^1.1.0"
"babel-jest": "22.4.3",
"babel-loader": "7.1.1",
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1",
"eslint": "3.14.0",
"eslint-config-google": "0.9.1",
"eslint-config-react-app": "0.5.0",
"eslint-loader": "1.6.1",
"eslint-plugin-flowtype": "2.30.0",
"eslint-plugin-import": "2.2.0",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.9.0",
"iterators-polyfill": "1.0.2",
"jest": "22.4.3",
"react-test-renderer": "16.3.2",
"webpack": "1.15.0",
"webpack-bundle-tracker": "0.2.1",
"webpack-cleanup-plugin": "0.4.2",
"webpack-dev-server": "1.16.2",
"webpack-manifest-plugin": "1.1.0"
}
}

0 comments on commit c179860

Please sign in to comment.