Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e0a9b6c6e | ||
|
|
4b6ca068e7 | ||
|
|
7a3e380c24 | ||
|
|
b56616cdc7 | ||
|
|
6c2e96b37e | ||
|
|
d668c50abb | ||
|
|
c4c9f88c94 | ||
|
|
a5c60c2b07 | ||
|
|
589d28730f |
57
.github/labels.yml
vendored
Normal file
57
.github/labels.yml
vendored
Normal 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
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# dokku postgres [](https://travis-ci.org/dokku/dokku-postgres) [](https://webchat.freenode.net/?channels=dokku)
|
# dokku postgres [](https://travis-ci.org/dokku/dokku-postgres) [](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
|
||||||
|
|||||||
@@ -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
2
config
@@ -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}
|
||||||
|
|
||||||
|
|||||||
2
install
2
install
@@ -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"
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user