Closed RussellMcOrmond closed 2 years ago
Example .env, with all passwords removed:
russell@russell-XPS-13-7390:~/git/cihm-metadatabus$ cat .env
# Older OpenStack Swift object storage
# Assumed the same Swift cluster for Preservation and Access
#SWIFT_server=https://swift-uab.canadiana.ca
#SWIFT_user=tdrepo
#SWIFT_password=nothere
#SWIFT_account=AUTH_crkn
SWIFT_server=https://swift-tor.canadiana.ca
SWIFT_user=rmcormond
SWIFT_password=nop
SWIFT_account=AUTH_rmcormond
# New Environment variables used by Smelter
# Preservation
SWIFT_preservation_server=https://swift-uab.canadiana.ca
SWIFT_preservation_user=tdrepo
SWIFT_preservation_password=noway
SWIFT_preservation_account=AUTH_crkn
# Access
#SWIFT_access_server=http://swift-dev.canadiana.ca
#SWIFT_access_server_options={ "furl_options": { "timeout": 3600 , "ssl_opts": { "SSL_verify_mode": 0 } } }
#SWIFT_access_user=test:tester
#SWIFT_access_password=testing
#SWIFT_access_account=AUTH_test
SWIFT_access_server=https://swift-tor.canadiana.ca
SWIFT_access_user=rmcormond
SWIFT_access_password=nop
SWIFT_access_account=AUTH_rmcormond
# Containers
SWIFT_access_metadata=access-metadata-test
SWIFT_access_files=access-files-test
SWIFT_preservation_files=preservation-cihm-aip
# Cantaloupe Image Server
IIIF_IMAGE_server=https://image-dev.canadiana.ca/iiif/2/
IIIF_IMAGE_password=alsoNo
# CouchDB Databases
COUCHDB_ACCESS=http://jarlsberg.tor.c7a.ca:5984/access
#COUCHDB_ACCESS=https://couch-dev.canadiana.ca/access
COUCHDB_CANVAS=http://jarlsberg.tor.c7a.ca:5984/canvas
#COUCHDB_CANVAS=https://couch-dev.canadiana.ca/canvas
COUCHDB_COPRESENTATION2=http://jarlsberg.tor.c7a.ca:5984/copresentation2
COUCHDB_COSEARCH2=http://jarlsberg.tor.c7a.ca:5984/cosearch2
COUCHDB_DIPSTAGING=http://jarlsberg.tor.c7a.ca:5984/dipstaging
COUCHDB_DMDTASK=http://jarlsberg.tor.c7a.ca:5984/dmdtask
COUCHDB_EXTRAMETA=http://jarlsberg.tor.c7a.ca:5984/extrameta
COUCHDB_INTERNALMETA2=http://jarlsberg.tor.c7a.ca:5984/internalmeta2
COUCHDB_OCRTASK=http://jarlsberg.tor.c7a.ca:5984/ocr
COUCHDB_TDREPO=http://jarlsberg.tor.c7a.ca:5984/tdrepo
COUCHDB_WIPMETA=http://jarlsberg.tor.c7a.ca:5984/wipmeta
# NOID server
NOID_server=http://noid.c7a.ca
That sample has a mixture of stuff you would want to do in dev
testing, and stuff you would do in prod
testing, which can now be split into two different environment files.
Inside the "access-platform" network generated by the Access-Platform docker compose you can use the IP address assigned to HAProxy. This gets rid of the odd "192.168.142.38" you will see in the "run" script which was specific to my home LAN.
You can pass in names that will be usable within the container with https://docs.docker.com/compose/compose-file/compose-file-v2/#extra_hosts
While the ideal would be to use the local "Switf All In One", I ran into a problem with interacting with it.
https://github.com/crkn-rcdr/cihm-metadatabus/issues/25#issuecomment-1183647316
What I did for my own testing was to create containers in my AUTH_rmcormond account on https://swift-tor.canadiana.ca
Using ideas from other repositories, create an environment for the metadatabus that can attach to running containers from https://github.com/crkn-rcdr/Access-Platform in order to have a local dev/test environment.
pnpm docker:dev
andpnpm docker:prod
work as we want them to.