add docker yml for postgres
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -34,6 +34,9 @@ out
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# psql data directory
|
||||
pg_data
|
||||
|
||||
|
||||
npm-debug.log
|
||||
key.pem
|
||||
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:latest
|
||||
container_name: postgresql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: ttdb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./pg_data:/var/lib/postgresql/data
|
||||
- ./src/db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
driver: local
|
Reference in New Issue
Block a user