Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use apt.postgresql.org for client packages #126

Merged
merged 2 commits into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@ MAINTAINER Alt Three <support@alt-three.com>
ARG cachet_ver
ENV cachet_ver master

ENV PG_MAJOR 9.5

RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8

RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list

# Using debian packages instead of compiling from scratch
RUN DEBIAN_FRONTEND=noninteractive \
echo "APT::Install-Recommends \"0\";" >> /etc/apt/apt.conf.d/02recommends && \
echo "APT::Install-Suggests \"0\";" >> /etc/apt/apt.conf.d/02recommends && \
apt-get clean && \
apt-get -q -y update && \
apt-get -q -y install \
ca-certificates php5-fpm php5-curl \
ca-certificates \
postgresql-client-$PG_MAJOR \
mysql-client \
php5-fpm php5-curl \
php5-readline php5-mcrypt sudo \
php5-mysql php5-apcu php5-cli \
php5-gd php5-mysql php5-pgsql \
php5-sqlite wget sqlite git \
libsqlite3-dev postgresql-client mysql-client \
libsqlite3-dev \
supervisor cron && \
apt-get clean && apt-get autoremove -q && \
rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/*
Expand All @@ -43,7 +52,7 @@ USER www-data

# Install composer
RUN php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && \
php -r "copy('https://composer.github.io/installer.sig', '/tmp/composer-setup.sig');" && \
php -r "copy('https://composer.github.io/installer.sig', '/tmp/composer-setup.sig');" && \
php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" && \
php /tmp/composer-setup.php --version=1.1.2 && \
php -r "unlink('composer-setup.php');"
Expand Down
8 changes: 7 additions & 1 deletion test/test.full.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ load "lib/output"
}

@test "[$TEST_FILE] php artisan cachet:seed" {
command docker exec docker_cachet_1 php artisan cachet:seed
run docker exec docker_cachet_1 php artisan cachet:seed
assert_output -l 0 $'Database seeded with demo data successfully!'
}

@test "[$TEST_FILE] curl 200 test" {
Expand All @@ -39,6 +40,11 @@ load "lib/output"
assert_output -l 0 $'{"data":"Pong!"}'
}

@test "[$TEST_FILE] check for pg_dump version mismatch" {
run docker exec docker_cachet_1 php artisan app:update
refute_output -l 5 $'pg_dump: aborting because of server version mismatch'
}

@test "[$TEST_FILE] stop all bats containers" {
stop_bats_containers
}
Expand Down