diff --git a/.travis.yml b/.travis.yml index 57f786f..e40868a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ +dist: xenial sudo: required -dist: trusty language: go @@ -10,8 +10,9 @@ env: global: - GO111MODULE=on matrix: - - PGDB=9.6 RELEASE=true - - PGDB=10 + - PGDB=9.6 RELEASE=true PGIS=2.4 + - PGDB=10 PGIS=2.4 + - PGDB=11 PGIS=2.5 before_install: # setup postgresql @@ -20,7 +21,7 @@ before_install: - sudo -E service postgresql stop 9.4 - sudo -E service postgresql stop 9.5 - sudo -E service postgresql stop 9.6 - - sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install postgresql-$PGDB postgresql-client-$PGDB postgresql-$PGDB-postgis-2.4 postgresql-$PGDB-postgis-2.4-scripts + - sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install postgresql-$PGDB postgresql-client-$PGDB postgresql-$PGDB-postgis-$PGIS postgresql-$PGDB-postgis-$PGIS-scripts - sudo -E sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf - sudo -E sed -i 's/port = 5433/port = 5432/' /etc/postgresql/*/main/postgresql.conf - sudo -E service postgresql restart $PGDB diff --git a/CHANGELOG.md b/CHANGELOG.md index cced583..325c58f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v5.2.0 +---------- + * Sync release with RapidPro 5.2 + * Add PostgreSQL 11 tests + v2.0.1 ---------- * update table references according to v5.2 schema, use wrapf for errors diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..7bd3040 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.12.9-alpine3.9 + +WORKDIR /app + +RUN apk update \ + && apk add --virtual build-deps gcc git \ + && rm -rf /var/cache/apk/* + +RUN addgroup -S golang \ + && adduser -S -G golang golang + +COPY . . + +RUN go install -v ./cmd/... +RUN chown -R golang /app + +USER golang + +EXPOSE 8080 +ENTRYPOINT ["rp-archiver"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..683ae21 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" + +services: + indexer: + image: ${DOCKER_IMAGE_NAME:-ilhasoft/archiver}:${DOCKER_IMAGE_TAG:-latest} + build: + context: .. + dockerfile: ./docker/Dockerfile + ports: + - 8080:8000