Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (52 loc) · 1.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (52 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
services:
openpaste:
build: .
image: ghcr.io/im-fran/openpaste:${OPENPASTE_VERSION:-latest}
restart: unless-stopped
ports:
- "${PORT:-8080}:8080"
# Uncomment together with HTTP_REDIRECT_BIND to answer plain HTTP too:
#- "80:8081"
environment:
BASE_URL: ${BASE_URL:-http://localhost:8080}
DATABASE_URL: postgres://openpaste:${POSTGRES_PASSWORD:-openpaste}@db:5432/openpaste
STORAGE_DRIVER: ${STORAGE_DRIVER:-local}
STORAGE_PATH: /var/lib/openpaste/blobs
MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-104857600}
# HTTPS: both must be set, and the certs mounted into the container
TLS_CERT: ${TLS_CERT:-}
TLS_KEY: ${TLS_KEY:-}
TLS_RELOAD_SECS: ${TLS_RELOAD_SECS:-3600}
# Plain-HTTP listener that redirects to BASE_URL; needs TLS above
HTTP_REDIRECT_BIND: ${HTTP_REDIRECT_BIND:-}
# Only read when STORAGE_DRIVER=s3
S3_BUCKET: ${S3_BUCKET:-}
S3_PREFIX: ${S3_PREFIX:-openpaste}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
AWS_REGION: ${AWS_REGION:-us-east-1}
AWS_ENDPOINT: ${AWS_ENDPOINT:-}
volumes:
- blobs:/var/lib/openpaste
# Uncomment together with TLS_CERT/TLS_KEY to terminate TLS in openpaste:
#- ./certs:/etc/openpaste/tls:ro
depends_on:
db:
condition: service_healthy
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: openpaste
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-openpaste}
POSTGRES_DB: openpaste
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openpaste"]
interval: 5s
timeout: 3s
retries: 10
volumes:
blobs:
pgdata: