[新服务] docker composer建立privatebin/pbin阅后即焚服务

date
Nov 6, 2022
slug
newservice-privatebin-pbin-text-burn
status
Published
summary
tags
service
type
Post
URL
notion image

Summary

notion image
notion image

步骤

#1

export DOCKER_PROJ=privatebin_pbin
mkdir /data/$DOCKER_PROJ; cd /data/$DOCKER_PROJ

mkdir privatebin-data && chmod -R 777 privatebin-data

# 修改配置文件
wget -O conf.php https://raw.githubusercontent.com/PrivateBin/PrivateBin/master/cfg/conf.sample.php
vi conf.php

cat > docker-compose.yml <<EOF
version: "3.7"

services:
  privatebin:
    image: privatebin/nginx-fpm-alpine:1.3.5
    container_name: privatebin
    read_only: true # not in compose 3.0 documentation but appears supported based
    # on issues for docker compose in Github
    volumes:
      - './privatebin-data:/srv/data' # data volume for pastes allows pastes
      # to persist after container stop or restart
      - './conf.php:/srv/cfg/conf.php:ro' # second volume for custom configuration file
    ports:
      # To update: Be sure to use a reverse proxy for HTTPS termination 
      # in front of it for production environments.
      # ie, The Nginx setup supports only HTTP, so make sure that you run 
      # another webserver as reverse proxy in front of this for HTTPS 
      #offloading and reducing the attack surface on your TLS stack. The 
      # Nginx in this image is set up to deflate/gzip text content.
      #- $HOST_PORT:8080
    restart: always
networks:
  default:
    name: npm_nginx_proxy_manager-network
    external: true
EOF

docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f

npm配置一下

notion image
notion image

验证


© Ying Bun 2021 - 2024