File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ CLASS_NAME=" BlogDB::DB"
4+
5+ # Generate a random 8 character name for the docker container that holds the PSQL
6+ # database.
7+ PSQL_NAME=$( cat /dev/urandom | LC_ALL=C tr -dc ' a-zA-Z' | fold -w 8 | head -n 1)
8+
9+ # Launch a PSQL Instance
10+ PSQL_DOCKER=` docker run --rm --name $PSQL_NAME -e POSTGRES_PASSWORD=dbic -e POSTGRES_USER=dbic -e POSTGRES_DB=dbic -d \
11+ --mount type=bind,src=$PWD /etc/schema.sql,dst=/docker-entrypoint-initdb.d/schema.sql postgres:11`
12+
13+ docker run --rm --link $PSQL_NAME :psqldb --mount type=bind,src=$PWD ,dst=/app symkat/schema_builder /bin/build-schema $CLASS_NAME
14+
15+ docker kill $PSQL_DOCKER
16+
17+ sudo chown -R $USER :$USER lib
Original file line number Diff line number Diff line change 1+ name = BlogDB-DB
2+ author = Kaitlyn Parkhurst <symkat@symkat.com>
3+ license = Perl_5
4+ copyright_holder = Kaitlyn Parkhurst
5+ copyright_year = 2021
6+ abstract = BlogDB' s Database
7+ version = 1
8+
9+ [@Basic]
10+
11+ [Prereqs]
12+ DBIx::Class::InflateColumn::Serializer = 0
13+ DBIx::Class::Schema::Config = 0
14+ DBIx::Class::DeploymentHandler = 0
15+ MooseX::AttributeShortcuts = 0
16+ MooseX::Getopt = 0
17+ Data::GUID = 0
18+ DBD::Pg = 0
19+
20+ [AutoPrereqs]
You can’t perform that action at this time.
0 commit comments