Skip to content

Commit

Permalink
[#74] Add PostgresSQL Client
Browse files Browse the repository at this point in the history
  • Loading branch information
dedenbangkit committed Feb 7, 2020
1 parent f65469d commit b72e275
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions flow-api/Jobs_Uduma_ReportUpdate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM python:3.6.6-jessie
WORKDIR /usr/src/app

RUN apt-get update && \
apt-get -y install sudo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo<Paste>
USER docker
RUN sudo apt-get install -y postgresql-client

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion flow-api/Jobs_Uduma_ReportUpdate/ci/k8s/job.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ spec:
- name: PSQL_USER
value: "postgres"
restartPolicy: Never
backoffLimit: 4
backoffLimit: 1
2 changes: 1 addition & 1 deletion flow-api/Jobs_Uduma_ReportUpdate/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -eu
python migrations/manage.py version_control "postgresql://$PSQL_USER:$PSQL_PWD@$PSQL_HOST/uduma_report" migrations
migrate manage manage.py --repository=migrations --url="postgresql://$PSQL_USER:$PSQL_PWD@$PSQL_HOST/uduma_report"
python manage.py upgrade
python init.py
# python init.py
2 changes: 1 addition & 1 deletion flow-api/Jobs_Uduma_ReportUpdate/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pytest==5.0.1
Hypothesis==3.58
PyMySQL==0.9.3
psycopg2==2.7.7
psycopg2==2.8.4
psycopg2-binary==2.8.4
SQLAlchemy==1.3.13
sqlalchemy-migrate==0.13.0
Expand Down

0 comments on commit b72e275

Please sign in to comment.