Merge pull request #113 from PrivateBin/s3-variant

WIP: add an S3 storage variant image
This commit is contained in:
El RIDO 2022-12-11 06:32:54 +01:00 committed by GitHub
commit b05b987fa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 5 deletions

View file

@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
base-image: [stable, edge]
destination-image: [nginx-fpm-alpine, fs, pdo, gcs]
destination-image: [nginx-fpm-alpine, fs, gcs, pdo, s3]
name: ${{ matrix.destination-image }} image / ${{ matrix.base-image }} release
steps:
- name: Checkout

View file

@ -1,7 +1,7 @@
FROM alpine:3.17.0
ARG ALPINE_PACKAGES="php81-pdo_mysql php81-pdo_pgsql php81-openssl"
ARG COMPOSER_PACKAGES=google/cloud-storage
ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage"
ARG PBURL=https://github.com/PrivateBin/PrivateBin/
ARG RELEASE=1.4.0
ARG UID=65534

View file

@ -6,10 +6,11 @@ This repository contains the Dockerfile and resources needed to create a docker
## Image variants
This is the all-in-one image that can be used with any storage backend supported by PrivateBin: File based storage, database or Google Cloud Storage. We also offer dedicated images for each backend:
This is the all-in-one image that can be used with any storage backend supported by PrivateBin: File based storage, databases, Google Cloud or S3 Storage. We also offer dedicated images for each backend:
- [Image for file based storage](https://hub.docker.com/r/privatebin/fs)
- [Image for PostgreSQL, MariaDB & MySQL](https://hub.docker.com/r/privatebin/pdo)
- [Image for Google Cloud Storage](https://hub.docker.com/r/privatebin/gcs)
- [Image for S3 Storage](https://hub.docker.com/r/privatebin/s3)
## Image tags

7
README.s3.md Normal file
View file

@ -0,0 +1,7 @@
# PrivateBin on Nginx, php-fpm & Alpine with S3 Storage backend
**PrivateBin** is a minimalist, open source online [pastebin](https://en.wikipedia.org/wiki/Pastebin) where the server has zero knowledge of pasted data. Data is encrypted and decrypted in the browser using 256bit AES in [Galois Counter mode](https://en.wikipedia.org/wiki/Galois/Counter_Mode).
## Image variants
This is an image optimized for the S3 Storage backend. Please see the [generic image](https://hub.docker.com/r/privatebin/nginx-fpm-alpine) for details on how to use this image, other images variants and the different tags.

View file

@ -56,11 +56,14 @@ main() {
fs)
BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES="
;;
gcs)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage"
;;
pdo)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-pdo_mysql,php81-pdo_pgsql --build-arg COMPOSER_PACKAGES="
;;
gcs)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-openssl"
s3)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-openssl --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
;;
*)
BUILD_ARGS=""