Skip to content

Commit 16306ab

Browse files
committed
bump dependencies
1 parent b33ed5f commit 16306ab

File tree

6 files changed

+17
-39
lines changed

6 files changed

+17
-39
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Michael Herman
3+
Copyright (c) 2021 Michael Herman
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

app/Dockerfile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pull official base image
2-
FROM python:3.8.1-alpine
2+
FROM python:3.9.4-alpine
33

44
# set environment varibles
55
ENV PYTHONDONTWRITEBYTECODE 1
@@ -8,28 +8,18 @@ ENV PYTHONUNBUFFERED 1
88
# set work directory
99
WORKDIR /usr/src/app
1010

11-
# install psycopg2
11+
# install system dependencies
1212
RUN 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
2319
RUN pip install --upgrade pip
2420
COPY ./requirements.txt /usr/src/app/requirements.txt
2521
RUN pip install -r requirements.txt
2622
RUN pip install psycopg2
2723

28-
# copy entrypoint.sh
29-
COPY ./entrypoint.sh /usr/src/app/entrypoint.sh
30-
3124
# copy project
3225
COPY . /usr/src/app/
33-
34-
# run entrypoint.sh
35-
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]

app/entrypoint.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Django==3.0.3
2-
gunicorn==20.0.4
1+
Django==3.2
2+
gunicorn==20.1.0

docker-compose.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version: '3.7'
1+
version: '3.8'
22

33
services:
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:

nginx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nginx:1.17.8-alpine
1+
FROM nginx:1.19-alpine
22

33
RUN rm /etc/nginx/conf.d/default.conf
44
COPY nginx.conf /etc/nginx/conf.d

0 commit comments

Comments
 (0)