Skip to content

Commit

Permalink
fix: docker build was failing due to incorrect installation of postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel-hanson committed Sep 6, 2023
1 parent 239451e commit d87f020
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: [3.6.10]
python_version: [3.7.17]
# python_version: [3.5.7, 3.6.10, 3.7.5, 3.8.2]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Django aws eb deployment
uses: ./
with:
Expand All @@ -33,21 +33,24 @@ jobs:
flake8_config_file: "sample_project/.flake8"

- name: Coverage report artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: coverage report
path: output/coverage_report.txt
if-no-files-found: warn

- name: Coverage report artifacts if failed
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
if: failure()
with:
name: coverage report if failed
path: output/coverage_report.txt
if-no-files-found: warn

- name: Security check report artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
if: failure()
with:
name: bandit
path: output/security_report.txt
if-no-files-found: warn
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM ubuntu:18.04

RUN apt-get -y update && apt-get -y upgrade && apt-get -y install gnupg2 wget
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install gnupg2 wget ca-certificates

RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN apt-get -y update && apt-get -y install software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
RUN apt install -y ca-certificates
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add -
RUN apt-get update
RUN apt-get -y update && apt-get -y install software-properties-common postgresql-10 postgresql-client-10 postgresql-contrib-10

USER postgres

Expand Down
2 changes: 1 addition & 1 deletion sample_project/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Django==2.2.20
Django==2.2.28
psycopg2-binary
django-environ

0 comments on commit d87f020

Please sign in to comment.