Skip to content

Instantly share code, notes, and snippets.

@dmd
Created March 15, 2021 22:51
Show Gist options
  • Save dmd/0a6133abaf41fd88bc8285a2e0cdd24c to your computer and use it in GitHub Desktop.
Save dmd/0a6133abaf41fd88bc8285a2e0cdd24c to your computer and use it in GitHub Desktop.
version: '3.6'
x-logging:
&default-logging
driver: "json-file"
options:
max-size: "200m"
max-file: "20"
services:
orthanc:
# https://hub.docker.com/r/osimis/orthanc/tags?page=1&ordering=last_updated
restart: always
image: osimis/orthanc:21.2.0
depends_on:
- postgres
# should probably unexpose 8042 in the future and
# have that only on the backend network; but for
# setup I want to call the Orthanc API without
# saml-proxy in the way
ports:
- "4242:4242"
- "8042:8042"
networks:
- backend
volumes:
- ./orthanc.json:/etc/orthanc/orthanc.json:ro
- ./scripts:/etc/orthanc/scripts:ro
- type: volume
source: orthanc_data
target: /etc/orthanc/OrthancStorage
volume:
nocopy: true
command: /etc/orthanc/orthanc.json
environment:
- STONE_WEB_VIEWER_PLUGIN_ENABLED=true
logging: *default-logging
postgres:
restart: always
image: postgres:13.1
ports:
- "5555:5432"
networks:
- backend
volumes:
- /orthanc-db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=orthanc
logging: *default-logging
pgbackups:
restart: always
image: prodrigestivill/postgres-backup-local
volumes:
- type: volume
source: orthanc_dbbk
target: /backups
volume:
nocopy: true
depends_on:
- postgres
networks:
- backend
environment:
- POSTGRES_HOST=postgres
- POSTGRES_DB=orthanc
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_EXTRA_OPTS=-Z6 --schema=public --blobs
- SCHEDULE=@daily
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
- HEALTHCHECK_PORT=8080
saml-proxy:
restart: always
build:
context: proxy
dockerfile: Dockerfile-saml-proxy
environment:
BACKEND: http://${HOST_HOSTNAME}:8042
SCHEMA: https
PROXY_HOST: ${PROXY_HOST}
HOST_HOSTNAME: ${HOST_HOSTNAME}
DBSYSTEM: ${DBSYSTEM}
networks:
- frontend
ports:
- "${HOST_PORT}:443"
volumes:
- ./proxy/${HOST_HOSTNAME}_saml_idp.xml:/etc/httpd/conf.d/saml_idp.xml:ro
- ./proxy/ssl:/etc/httpd/ssl:ro
logging: *default-logging
networks:
frontend:
backend:
volumes:
orthanc_dbbk:
driver_opts:
type: "nfs"
o: "addr=nisaba.mclean.harvard.edu,nolock,soft,rw"
device: ":/mnt/Pool1/orthanc/database-backup/${DBSYSTEM}"
orthanc_data:
driver_opts:
type: "nfs"
o: "addr=nisaba.mclean.harvard.edu,nolock,soft,rw"
device: ":/mnt/Pool1/orthanc/${DBSYSTEM}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment