Skip to content

Commit

Permalink
Merge pull request #43 from mpast/upgrade-python-docker
Browse files Browse the repository at this point in the history
Upgraded docker images, python image and dependencies
  • Loading branch information
mpast authored Sep 11, 2021
2 parents 47b5d79 + 081f703 commit 5bdf60b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.DS_Store
.env
app/logs/*
rabbitmq/logs/*
Expand All @@ -10,4 +11,4 @@ app/static/rest_framework/
app/static/admin/
app/static/drf-yasg/
*.key
*.crt
*.crt
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.4-buster@sha256:79a631c93960c5919f27f3403e734ec19b130008370a5f902141bcff2e6d6f4c
FROM python:3.9.7-buster@sha256:79a631c93960c5919f27f3403e734ec19b130008370a5f902141bcff2e6d6f4c
# Update and package installation
RUN apt-get update && \
apt-get clean && \
Expand Down Expand Up @@ -43,8 +43,9 @@ COPY . /app
WORKDIR /app


# Install python dependencies
RUN pip install -r requirements.txt
# Upgrade pip and install python dependencies
RUN pip install --upgrade pip \
&& pip install -r requirements.txt

# Encoding configuration
ENV LANG en_US.UTF-8
Expand Down
7 changes: 3 additions & 4 deletions docker-compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.8'
services:
db:
image: postgres:13.2@sha256:5cfcfb0516ddd317109e2746a462b1dc398d152936640a2b69284629f48dc288
image: postgres:13.4@sha256:97e5e91582e89514277912d4b7c95bceabdede3482e32395bcb40099abd9c506
env_file:
- ./.env.example
environment:
Expand All @@ -28,7 +28,7 @@ services:
- db
restart: on-failure
nginx:
image: nginx:1.19.10@sha256:75a55d33ecc73c2a242450a9f1cc858499d468f077ea942867e662c247b5e412
image: nginx:1.21.3@sha256:853b221d3341add7aaadf5f81dd088ea943ab9c918766e295321294b035f3f3e
ports:
- "443:443"
volumes:
Expand All @@ -39,8 +39,7 @@ services:
- web
restart: on-failure
rabbitmq:
image: rabbitmq:3.8.14-management-alpine@sha256:7248e0d63eb59364b1b8e0456580450ff8061f9365d344ab211a4ce7b544886f
env_file:
image: rabbitmq:3.9.5@sha256:3b3f7b55be78e1b3c7330671ffc3f5e3670f66f040a4a429109a7f56c90464dc env_file:
- ./.env.example
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-guest}
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.8'
services:
db:
image: postgres:13.2@sha256:5cfcfb0516ddd317109e2746a462b1dc398d152936640a2b69284629f48dc288
image: postgres:13.4@sha256:97e5e91582e89514277912d4b7c95bceabdede3482e32395bcb40099abd9c506
env_file:
- ./.env.example
environment:
Expand All @@ -28,7 +28,7 @@ services:
- db
restart: on-failure
nginx:
image: nginx:1.19.10@sha256:75a55d33ecc73c2a242450a9f1cc858499d468f077ea942867e662c247b5e412
image: nginx:1.21.3@sha256:853b221d3341add7aaadf5f81dd088ea943ab9c918766e295321294b035f3f3e
ports:
- "8888:8888"
volumes:
Expand All @@ -38,7 +38,7 @@ services:
- web
restart: on-failure
rabbitmq:
image: rabbitmq:3.8.14-management-alpine@sha256:7248e0d63eb59364b1b8e0456580450ff8061f9365d344ab211a4ce7b544886f
image: rabbitmq:3.9.5@sha256:3b3f7b55be78e1b3c7330671ffc3f5e3670f66f040a4a429109a7f56c90464dc
env_file:
- ./.env.example
environment:
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
django==3.2.5
psycopg2-binary==2.8.6
django==3.2.7
psycopg2-binary==2.9.1
django-bootstrap4==3.0.1
django-widget-tweaks==1.4.8
django-fontawesome-5==1.0.18
django-getenv==1.3.2
androguard==3.4.0a1
requests==2.25.1
requests==2.26.0
pdfkit==0.6.1
uwsgi==2.0.19.1
Pygments==2.8.1
Pygments==2.10.0
djangorestframework==3.12.4
drf-yasg==1.20.0
Celery==5.0.5
Celery==5.1.2
django-filter==2.4.0
sqlalchemy==1.4.12
sqlalchemy==1.4.23
django-extensions==3.1.3

2 comments on commit 5bdf60b

@optimostech
Copy link

@optimostech optimostech commented on 5bdf60b Sep 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2021-09-23 at 7 39 46 PM

I have this error on the docker-compose. Repository?

@mpast
Copy link
Owner Author

@mpast mpast commented on 5bdf60b Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@optimostech there are all public repositories so this should not happen, have you build the image with docker-compose build first and then docker-compose up?

Please sign in to comment.