Added database migration docker

This commit is contained in:
Lilleman auf Larv 2021-12-10 23:38:39 +01:00
parent d4e394fa6b
commit 998266f929
2 changed files with 9 additions and 1 deletions

5
Dockerfile.db Normal file
View File

@ -0,0 +1,5 @@
FROM amacneil/dbmate:v1.12.1
COPY ./db ./db
CMD ["--wait", "up"]

View File

@ -11,7 +11,10 @@ services:
- 5432:5432
db-migrations:
image: amacneil/dbmate:v1.12.1
build:
context: .
dockerfile: Dockerfile.db
#image: amacneil/dbmate:v1.12.1
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/auth?sslmode=disable
volumes: