feat: add docker db
This commit is contained in:
parent
fe480828f4
commit
dac9a26a3a
2 changed files with 36 additions and 0 deletions
5
.env
Normal file
5
.env
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
WRSR_DATABASE_NAME="wsrs"
|
||||||
|
WRSR_DATABASE_USER="postgres"
|
||||||
|
WRSR_DATABASE_PASSWORD="123456789"
|
||||||
|
WRSR_DATABASE_PORT=5432
|
||||||
|
WRSR_DATABASE_HOST="localhost"
|
||||||
31
compose.yml
Normal file
31
compose.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- ${WRSR_DATABASE_PORT:-5432}:5432
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${WRSR_DATABASE_USER}
|
||||||
|
POSTGRES_PASSWORD: ${WRSR_DATABASE_PASSWORD}
|
||||||
|
POSTGRES_DB: ${WRSR_DATABASE_NAME}
|
||||||
|
volumes:
|
||||||
|
- db:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
pgadmin:
|
||||||
|
image: dpage/pgadmin4:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
ports:
|
||||||
|
- 8081:80
|
||||||
|
environment:
|
||||||
|
PGADMIN_DEFAULT_EMAIL: admin@admin.com
|
||||||
|
PGADMIN_DEFAULT_PASSWORD: password
|
||||||
|
volumes:
|
||||||
|
- pgadmin:/var/lib/pgadmin
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
||||||
|
driver: local
|
||||||
|
pgadmin:
|
||||||
|
driver: local
|
||||||
Loading…
Reference in a new issue