Skip to content

Commit 600f51d

Browse files
committed
Default to production, allow override for tests
1 parent f7ed24b commit 600f51d

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
- DB_PREFIX=chq_
2929
- APP_KEY=${APP_KEY:-null}
3030
- APP_LOG=errorlog
31-
- APP_ENV=production
31+
- APP_ENV=${APP_ENV:-production}
3232
- APP_DEBUG=false
3333
- DEBUG=false
3434
depends_on:

test/test.full.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ load docker_helpers
44
load "lib/batslib"
55
load "lib/output"
66

7-
export APP_KEY="base64:v2LwHrdgnE+RavEXdnF8LgWIibjvEcFkU2qaX5Ji708="
8-
97
@test "[$TEST_FILE] testing Cachet Docker image build" {
108
command docker-compose build --no-cache cachet
119
}

test/test.mysql.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ load docker_helpers
44
load "lib/batslib"
55
load "lib/output"
66

7-
export APP_KEY="base64:v2LwHrdgnE+RavEXdnF8LgWIibjvEcFkU2qaX5Ji708="
8-
97
@test "[$TEST_FILE] docker-compose up" {
108
command docker-compose -f test/docker-compose-mysql.yml up -d
119
}

test/test.sqlite.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ load docker_helpers
44
load "lib/batslib"
55
load "lib/output"
66

7-
export APP_KEY="base64:v2LwHrdgnE+RavEXdnF8LgWIibjvEcFkU2qaX5Ji708="
8-
97
@test "[$TEST_FILE] docker-compose up" {
108
command docker-compose -f test/docker-compose-sqlite.yml up -d
119
}

test/test_helpers.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
type docker &>/dev/null || ( echo "docker is not available"; exit 1 )
44
)>&2
55

6+
# ENV vars for tests
7+
export APP_ENV=development
8+
export APP_KEY="base64:v2LwHrdgnE+RavEXdnF8LgWIibjvEcFkU2qaX5Ji708="
9+
610
TEST_FILE=$(basename $BATS_TEST_FILENAME .bats)
711

812
# stop all containers with the "bats-type" label (matching the optionally supplied value)

0 commit comments

Comments
 (0)