Skip to content

Commit

Permalink
Merge pull request #2 from JargeZ/pg-16
Browse files Browse the repository at this point in the history
Update to pg 16
  • Loading branch information
staser authored May 20, 2024
2 parents c70e19e + 77721a6 commit 18ee2bc
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
FROM ubuntu:18.04
FROM postgres:16

RUN apt update && apt install -y wget gnupg pigz pbzip2 xz-utils lrzip brotli zstd \
&& wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list \
&& apt update && apt install -y postgresql-client \
&& wget https://dl.minio.io/client/mc/release/linux-amd64/mc -O /sbin/mc && chmod +x /sbin/mc \
&& apt remove -y wget && apt autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
45 changes: 45 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: "3.9"

volumes:
minio_data:
postgres_data:

services:
postgres-backup:
image: backuptools/postgres-backup-s3
restart: no
build: .
environment:
- S3_BUCK=test-backup
- S3_NAME=folder-name/backup-name-prefix
- S3_URI=http://minio:minio123@minio:9000
- PG_URI=postgres://postgres:postgres@postgres:5432/postgres
# Available: pigz, xz, bzip2, lrzip, brotli, zstd
- COMPRESS=pigz
depends_on:
- minio
- postgres
entrypoint: ""
command: "/bin/sh -c 'while :; do sleep 10s && ./entrypoint.sh; done'"


minio:
image: minio/minio
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
command: server /data --console-address ":9001" --address 0.0.0.0:9000

postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
- ./test-init.sql:/docker-entrypoint-initdb.d/init-dump.sql
ports:
- "5434:5432"

0 comments on commit 18ee2bc

Please sign in to comment.