Skip to content

Commit

Permalink
Fixing data root folder location.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisgarciaalanis committed Oct 10, 2020
1 parent 871fa0d commit 560a46f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
All notable changes will be documented in this file in accordance with
[![keepachangelog 1.0.0](https://img.shields.io/badge/keepachangelog-1.0.0-brightgreen.svg)](http://keepachangelog.com/en/1.0.0/)

## \[1.0.1] - 2020-10-09
## \[1.0.3] - 2020-10-10

### Fixed

- Making the dbDataRootDir folder be the place where the databse data resides.

## \[1.0.2] - 2020-10-09

### Added

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ the op uses [![opspec 0.1.6](https://img.shields.io/badge/opspec-0.1.6-brightgre
## Install

```shell
opctl op install github.com/opspec-pkgs/postgresql.db.run#1.0.2
opctl op install github.com/opspec-pkgs/postgresql.db.run#1.0.3
```

## Run

```
opctl run github.com/opspec-pkgs/postgresql.db.run#1.0.2
opctl run github.com/opspec-pkgs/postgresql.db.run#1.0.3
```

## Compose

```yaml
op:
ref: github.com/opspec-pkgs/postgresql.db.run#1.0.2
ref: github.com/opspec-pkgs/postgresql.db.run#1.0.3
inputs:
# required
dbDataRootDir:
Expand Down
20 changes: 7 additions & 13 deletions op.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
description: Runs a PostgeSQL database.
name: github.com/opspec-pkgs/postgresql.db.run
opspec: 0.1.6
version: 1.0.2
version: 1.0.3
inputs:
dbDataRootDir:
dir:
description: directory to put the database data folder.
description: Directory location for database data.
dbHostname:
string:
description: name for the PostgreSQL container.
description: Name for the PostgreSQL container.
default: postgresql-db
dbSchema:
string:
description: name of the database to be created.
description: Name of the database to be created.
constraints: { minLength: 1 }
dbUsername:
string:
description: username to connect to the database.
description: Username to connect to the database.
constraints: { minLength: 1 }
dbPassword:
string:
description: password to connect to the database.
description: Password to connect to the database.
isSecret: true
constraints: { minLength: 1 }
run:
Expand All @@ -40,17 +40,11 @@ run:
echo ERROR: dbUsername can\'t be root!
exit 1
fi
if [ ! -d ./data ]; then
mkdir ./data
fi
if [ ! -d ./data/postgresql-data ]; then
mkdir ./data/postgresql-data
fi
exit 0
- container:
image: { ref: 'postgres:13.0-alpine' }
name: $(dbHostname)
dirs: { '/var/lib/postgresql/data': $(dbDataRootDir/data/postgresql-data) }
dirs: { '/var/lib/postgresql/data': $(dbDataRootDir) }
envVars:
POSTGRES_USER: $(dbUsername)
POSTGRES_PASSWORD: $(dbPassword)
Expand Down

0 comments on commit 560a46f

Please sign in to comment.