Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker compose support #28

Draft
wants to merge 1 commit into
base: correct-url
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:2.7

WORKDIR nyc-stabilization-unit-counts

RUN apt-get update
RUN apt-get install -yq libxml2-dev libxslt1-dev xpdf postgresql-client

RUN pwd

COPY ./requirements.txt .
RUN pip install -r requirements.txt
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.4",
"services": {
"main": {
"build": ".",
"volumes": [
".:/nyc-stabilization-unit-counts",
],
"environment": {
"PGHOST": "postgres",
"PGUSER": "postgres",
}
},
"postgres": {
"image": "postgres:11",
}
}
}
10 changes: 5 additions & 5 deletions reparse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

source .env/bin/activate

export PGPASSWORD=docker4data
export PGUSER=postgres
export PGHOST=localhost
export PGPORT=54321
export PGDATABASE=postgres
export PGPASSWORD=${docker4data:-}
export PGUSER=${postgres:-postgres}
export PGHOST=${localhost:-postgres}
export PGPORT=${54321:-5432}
export PGDATABASE=${postgres:-}

psql -c 'drop table if exists rgb cascade;'
psql -c 'create table rgb (
Expand Down