bump versions: django 3, alpine 3.10, postgres 12

master
Clemens Klug 2019-12-04 16:32:48 +01:00
parent 226ce8a772
commit 19764fbf00
4 changed files with 20 additions and 7 deletions

View File

@ -2,7 +2,7 @@ version: "2"
services:
web:
image: docker.clkl.de/partdoc/web:0.2
image: docker.clkl.de/partdoc/web:0.3
build: partdoc
env_file: postgres.env
volumes:
@ -12,8 +12,10 @@ services:
command: python3 ./manage.py runserver 0.0.0.0:8000
ports:
- 8080:8000
depends_on:
- db
db:
image: postgres:10-alpine
image: postgres:12-alpine
volumes:
- ./pgdata/:/var/lib/postgresql/data/
env_file: postgres.env

11
migrate_postgres.sh Normal file
View File

@ -0,0 +1,11 @@
# start old postgres, dump data
sed -i 's/postgres:12-alpine/postgres:10-alpine/' docker-compose.yml
docker-compose exec db pg_dumpall -U partdoc > pgdump.tmp
# migrate to new postgres, import data
docker-compose stop db
sed -i 's/postgres:10-alpine/postgres:12-alpine/' docker-compose.yml
docker-compose up -d
docker-compose exec -T db psql -U partdoc < pgdump.tmp
docker-compose down
docker-compose up -d
rm pgdump.tmp

View File

@ -1,4 +1,4 @@
FROM alpine:3.7
FROM alpine:3.10
ADD requirements.txt /
RUN apk add --update --no-cache python3 py3-psycopg2 && \

View File

@ -1,2 +1,2 @@
django==2.0.1
psycopg2==2.7.3.2
django==3.0
psycopg2==2.8.4