Skip to content

Commit

Permalink
Devel database tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaitlyn Parkhurst committed Oct 9, 2021
1 parent 92bf84c commit 661e629
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .dex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- name: db
desc: "Control Devel DB Only"
children:
- name: start
desc: "Start devel db on localhost via docker."
shell:
- docker-compose --project-directory ./DB -f ./.docker/database.yml up
- name: stop
desc: "Stop devel db on localhost via docker."
shell:
- docker-compose --project-directory ./DB -f ./.docker/database.yml down
- name: status
desc: "Show status of devel db."
shell:
- docker-compose --project-directory ./DB -f ./.docker/database.yml ps
- name: reset
desc: "Wipe devel db data."
shell:
- docker-compose --project-directory ./DB -f ./.docker/database.yml down -v
- name: shell
desc: "Grab a shell to psql"
shell:
- docker exec -ti blogdb-db psql -U blogdb blogdb
31 changes: 31 additions & 0 deletions .docker/database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: '3'

services:
database:
image: postgres:11
container_name: blogdb-db
ports:
- 127.0.0.1:5432:5432
environment:
- POSTGRES_PASSWORD=blogdb
- POSTGRES_USER=blogdb
- POSTGRES_DB=blogdb
volumes:
- ./etc/schema.sql:/docker-entrypoint-initdb.d/000_schema.sql:ro
- blogdb_database:/var/lib/postgresql/data
# minion-database:
# image: postgres:11
# container_name: meshmage-minion-db
# ports:
# - 127.0.0.1:5433:5432
# environment:
# - POSTGRES_PASSWORD=minion
# - POSTGRES_USER=minion
# - POSTGRES_DB=minion
# volumes:
# - minion_database:/var/lib/postgresql/data


volumes:
blogdb_database:
# minion_database:

0 comments on commit 661e629

Please sign in to comment.