Compare commits

..

9 Commits
1.6.0 ... 1.6.2

Author SHA1 Message Date
Jose Diaz-Gonzalez
2e0a9b6c6e Release 1.6.2 2019-04-22 03:49:44 -04:00
Jose Diaz-Gonzalez
4b6ca068e7 Merge pull request #177 from dokku/upgrade-versions
feat: upgrade image version in use
2019-04-19 17:13:12 -04:00
Jose Diaz-Gonzalez
7a3e380c24 feat: upgrade image version in use 2019-04-19 12:47:38 -04:00
Jose Diaz-Gonzalez
b56616cdc7 feat: commit github labels to the repo
This will allow us to apply track what labels are available in the issue tracker using tonglil/labeler.
2019-04-10 03:28:09 -04:00
Jose Diaz-Gonzalez
6c2e96b37e Release 1.6.1 2019-03-28 05:25:14 -04:00
Jose Diaz-Gonzalez
d668c50abb fix: update docker-s3backup image to fix backups to s3 2019-03-28 05:23:39 -04:00
Jose Diaz-Gonzalez
c4c9f88c94 Merge pull request #174 from dokku/121-fix-alias
fix: correct issue where aliases were being generated incorrectly
2019-03-28 05:21:37 -04:00
Jose Diaz-Gonzalez
a5c60c2b07 fix: correct issue where aliases were being generated incorrectly 2019-03-27 12:18:18 -04:00
Jose Diaz-Gonzalez
589d28730f docs: update readme install instructions to point to correct dokku version 2019-03-26 11:51:12 -04:00
8 changed files with 80 additions and 13 deletions

57
.github/labels.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
labels:
- name: bc-break
color: eb6420
- name: blocks release
color: "000000"
- name: 'difficulty: easy'
color: c5def5
- name: 'difficulty: hard'
color: e99695
- name: 'difficulty: medium'
color: fef2c0
- name: hacktoberfest
color: b0581d
- name: 'needs: documentation'
color: c2e0c6
- name: 'needs: more info'
color: c2e0c6
- name: 'needs: rebase'
color: c2e0c6
- name: 'needs: tests'
color: c2e0c6
- name: 'status: duplicate'
color: cccccc
- name: 'status: fix-provided'
color: c5def5
- name: 'status: future'
color: c5def5
- name: 'status: has plan'
color: c5def5
- name: 'status: invalid'
color: cccccc
- name: 'status: merge for next minor'
color: c5def5
- name: 'status: merge for next patch'
color: c5def5
- name: 'status: wontfix'
color: cccccc
- name: 'type: bug'
color: e01b1b
- name: 'type: documentation'
color: 0052cc
- name: 'type: enhancement'
color: 09ab3c
- name: 'type: question'
color: cc317c
- name: 'type: refactor'
color: 0052cc
- name: 'type: rfc'
color: 0052cc
- name: 'type: roadmap'
color: 0052cc
- name: 'type: service'
color: "5319e7"
- name: 'type: support'
color: cc317c
- name: 'type: tests'
color: 0052cc

View File

@@ -1,6 +1,6 @@
# dokku postgres [![Build Status](https://img.shields.io/travis/dokku/dokku-postgres.svg?branch=master "Build Status")](https://travis-ci.org/dokku/dokku-postgres) [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg "IRC Freenode")](https://webchat.freenode.net/?channels=dokku) # dokku postgres [![Build Status](https://img.shields.io/travis/dokku/dokku-postgres.svg?branch=master "Build Status")](https://travis-ci.org/dokku/dokku-postgres) [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg "IRC Freenode")](https://webchat.freenode.net/?channels=dokku)
Official postgres plugin for dokku. Currently defaults to installing [postgres 10.4](https://hub.docker.com/_/postgres/). Official postgres plugin for dokku. Currently defaults to installing [postgres 11.2](https://hub.docker.com/_/postgres/).
## requirements ## requirements
@@ -10,7 +10,7 @@ Official postgres plugin for dokku. Currently defaults to installing [postgres 1
## installation ## installation
```shell ```shell
# on 0.4.x+ # on 0.12.x+
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
``` ```
@@ -60,7 +60,7 @@ dokku postgres:create lolipop
# it *must* be compatible with the # it *must* be compatible with the
# official postgres image # official postgres image
export POSTGRES_IMAGE="postgres" export POSTGRES_IMAGE="postgres"
export POSTGRES_IMAGE_VERSION="10.4" export POSTGRES_IMAGE_VERSION="11.2"
dokku postgres:create lolipop dokku postgres:create lolipop
# you can also specify custom environment # you can also specify custom environment

View File

@@ -113,9 +113,10 @@ service_alternative_alias() {
for COLOR in "${COLORS[@]}"; do for COLOR in "${COLORS[@]}"; do
ALIAS="${PLUGIN_ALT_ALIAS}_${COLOR}" ALIAS="${PLUGIN_ALT_ALIAS}_${COLOR}"
local IN_USE=$(echo "$EXISTING_CONFIG" | grep "${ALIAS}_URL") local IN_USE=$(echo "$EXISTING_CONFIG" | grep "${ALIAS}_URL")
if [[ -n $IN_USE ]]; then if [[ -z "$IN_USE" ]]; then
unset ALIAS break
fi fi
unset ALIAS
done done
echo "$ALIAS" echo "$ALIAS"
} }
@@ -185,7 +186,7 @@ service_backup() {
fi fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
docker run --rm $BACKUP_PARAMETERS dokku/s3backup:0.9.1 docker run --rm $BACKUP_PARAMETERS dokku/s3backup:0.9.4
} }
service_backup_auth() { service_backup_auth() {

2
config
View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export POSTGRES_IMAGE=${POSTGRES_IMAGE:="postgres"} export POSTGRES_IMAGE=${POSTGRES_IMAGE:="postgres"}
export POSTGRES_IMAGE_VERSION=${POSTGRES_IMAGE_VERSION:="10.4"} export POSTGRES_IMAGE_VERSION=${POSTGRES_IMAGE_VERSION:="11.2"}
export POSTGRES_ROOT=${POSTGRES_ROOT:="$DOKKU_LIB_ROOT/services/postgres"} export POSTGRES_ROOT=${POSTGRES_ROOT:="$DOKKU_LIB_ROOT/services/postgres"}
export POSTGRES_HOST_ROOT=${POSTGRES_HOST_ROOT:=$POSTGRES_ROOT} export POSTGRES_HOST_ROOT=${POSTGRES_HOST_ROOT:=$POSTGRES_ROOT}

View File

@@ -18,7 +18,7 @@ plugin-install() {
pull-docker-image "${PLUGIN_IMAGE}:${PLUGIN_IMAGE_VERSION}" pull-docker-image "${PLUGIN_IMAGE}:${PLUGIN_IMAGE_VERSION}"
pull-docker-image "dokku/ambassador:0.2.0" pull-docker-image "dokku/ambassador:0.2.0"
pull-docker-image "dokku/wait:0.3.0" pull-docker-image "dokku/wait:0.3.0"
pull-docker-image "dokku/s3backup:0.9.1" pull-docker-image "dokku/s3backup:0.9.4"
pull-docker-image "busybox:1.30.1-uclibc" pull-docker-image "busybox:1.30.1-uclibc"
mkdir -p "$PLUGIN_DATA_ROOT" || echo "Failed to create $PLUGIN_SERVICE data directory" mkdir -p "$PLUGIN_DATA_ROOT" || echo "Failed to create $PLUGIN_SERVICE data directory"

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku postgres service plugin" description = "dokku postgres service plugin"
version = "1.6.0" version = "1.6.2"
[plugin.config] [plugin.config]

View File

@@ -3,14 +3,17 @@ load test_helper
setup() { setup() {
dokku "$PLUGIN_COMMAND_PREFIX:create" l dokku "$PLUGIN_COMMAND_PREFIX:create" l
dokku "$PLUGIN_COMMAND_PREFIX:create" m
dokku apps:create my_app dokku apps:create my_app
} }
teardown() { teardown() {
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" m
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l
dokku --force apps:destroy my_app dokku --force apps:destroy my_app
} }
@test "($PLUGIN_COMMAND_PREFIX:link) error when there are no arguments" { @test "($PLUGIN_COMMAND_PREFIX:link) error when there are no arguments" {
run dokku "$PLUGIN_COMMAND_PREFIX:link" run dokku "$PLUGIN_COMMAND_PREFIX:link"
echo "output: $output" echo "output: $output"
@@ -69,8 +72,14 @@ teardown() {
dokku config:set my_app DATABASE_URL=postgres://user:pass@host:5432/db dokku config:set my_app DATABASE_URL=postgres://user:pass@host:5432/db
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
run dokku config my_app run dokku config my_app
assert_contains "${lines[*]}" "DOKKU_POSTGRES_" assert_contains "${lines[*]}" "DOKKU_POSTGRES_AQUA_URL"
assert_success assert_success
dokku "$PLUGIN_COMMAND_PREFIX:link" m my_app
run dokku config my_app
assert_contains "${lines[*]}" "DOKKU_POSTGRES_BLACK_URL"
assert_success
dokku "$PLUGIN_COMMAND_PREFIX:unlink" m my_app
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
} }

View File

@@ -11,20 +11,20 @@ teardown() {
@test "($PLUGIN_COMMAND_PREFIX:list) with no exposed ports, no linked apps" { @test "($PLUGIN_COMMAND_PREFIX:list) with no exposed ports, no linked apps" {
run dokku "$PLUGIN_COMMAND_PREFIX:list" run dokku "$PLUGIN_COMMAND_PREFIX:list"
assert_contains "${lines[*]}" "l postgres:10.4 running - -" assert_contains "${lines[*]}" "l postgres:11.2 running - -"
} }
@test "($PLUGIN_COMMAND_PREFIX:list) with exposed ports" { @test "($PLUGIN_COMMAND_PREFIX:list) with exposed ports" {
dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242 dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242
run dokku "$PLUGIN_COMMAND_PREFIX:list" run dokku "$PLUGIN_COMMAND_PREFIX:list"
assert_contains "${lines[*]}" "l postgres:10.4 running 5432->4242 -" assert_contains "${lines[*]}" "l postgres:11.2 running 5432->4242 -"
} }
@test "($PLUGIN_COMMAND_PREFIX:list) with linked app" { @test "($PLUGIN_COMMAND_PREFIX:list) with linked app" {
dokku apps:create my_app dokku apps:create my_app
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
run dokku "$PLUGIN_COMMAND_PREFIX:list" run dokku "$PLUGIN_COMMAND_PREFIX:list"
assert_contains "${lines[*]}" "l postgres:10.4 running - my_app" assert_contains "${lines[*]}" "l postgres:11.2 running - my_app"
dokku --force apps:destroy my_app dokku --force apps:destroy my_app
} }