File tree Expand file tree Collapse file tree 6 files changed +17
-39
lines changed Expand file tree Collapse file tree 6 files changed +17
-39
lines changed Original file line number Diff line number Diff line change 11MIT License
22
3- Copyright (c) 2020 Michael Herman
3+ Copyright (c) 2021 Michael Herman
44
55Permission is hereby granted, free of charge, to any person obtaining a copy
66of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change 11# pull official base image
2- FROM python:3.8.1 -alpine
2+ FROM python:3.9.4 -alpine
33
44# set environment varibles
55ENV PYTHONDONTWRITEBYTECODE 1
@@ -8,28 +8,18 @@ ENV PYTHONUNBUFFERED 1
88# set work directory
99WORKDIR /usr/src/app
1010
11- # install psycopg2
11+ # install system dependencies
1212RUN apk update \
1313 && apk add --virtual build-deps gcc python3-dev musl-dev \
14- && apk add postgresql-dev \
14+ && apk add bash postgresql-dev \
1515 && pip install psycopg2 \
1616 && apk del build-deps
1717
18- # install psycopg2 dependencies
19- RUN apk update \
20- && apk add postgresql-dev gcc python3-dev musl-dev
21-
22- # install dependencies
18+ # install python dependencies
2319RUN pip install --upgrade pip
2420COPY ./requirements.txt /usr/src/app/requirements.txt
2521RUN pip install -r requirements.txt
2622RUN pip install psycopg2
2723
28- # copy entrypoint.sh
29- COPY ./entrypoint.sh /usr/src/app/entrypoint.sh
30-
3124# copy project
3225COPY . /usr/src/app/
33-
34- # run entrypoint.sh
35- ENTRYPOINT ["/usr/src/app/entrypoint.sh" ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- Django == 3.0.3
2- gunicorn == 20.0.4
1+ Django == 3.2
2+ gunicorn == 20.1.0
Original file line number Diff line number Diff line change 1- version : ' 3.7 '
1+ version : ' 3.8 '
22
33services :
44 web :
55 build : ./app
6- command : gunicorn hello_django.wsgi:application --bind 0.0.0.0:8000
6+ command : bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; gunicorn hello_django.wsgi:application --bind 0.0.0.0:8000'
77 volumes :
88 - ./app/:/usr/src/app/
99 - static_volume:/usr/src/app/staticfiles
@@ -22,9 +22,15 @@ services:
2222 depends_on :
2323 - db
2424 db :
25- image : postgres:12.1 -alpine
25+ image : postgres:13 -alpine
2626 volumes :
2727 - postgres_data:/var/lib/postgresql/data/
28+ expose :
29+ - 5432
30+ environment :
31+ - POSTGRES_USER=postgres
32+ - POSTGRES_PASSWORD=postgres
33+ - POSTGRES_DB=postgres
2834 nginx :
2935 build : ./nginx
3036 volumes :
Original file line number Diff line number Diff line change 1- FROM nginx:1.17.8 -alpine
1+ FROM nginx:1.19 -alpine
22
33RUN rm /etc/nginx/conf.d/default.conf
44COPY nginx.conf /etc/nginx/conf.d
You can’t perform that action at this time.
0 commit comments