You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ClinicalTrialsDataProcessing/PostgressDocker/docker-compose.yaml

49 lines
1.6 KiB
YAML

version: '3'
volumes:
aact_pg_database: #This is to hold the database.
aact_helpful_files: #This is to hold files that need accessed by both pgadmin and postgres. I honestly expect it to usually be empty.
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: /home/will/research/ClinicalTrialsDataProcessing/PostgressDocker/host_data/
#change this path to match the path you are holding the dump file in
services:
aact:
container_name: aact_db
image: postgres
#restart: always #restart to run things well.
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: root
POSTGRES_DB: aact_db
ports:
- "5432:5432" #host:container
volumes: #host:container is the format.
#pull in a single file
#- $HOME/research/ClinicalTrialsDataProcessing/PostgressDocker/infile:/infile
#add a storage volumes
- aact_pg_database:/var/lib/postgresql/ # this is the database that persits between uses
- aact_helpful_files:/mnt/host_data #use :ro # to give read only permisions
#entrypoint:
#none yet
#- echo "test" > /test.touched
pgadmin:
container_name: pgadmin4_webservice
image: dpage/pgadmin4
#restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
ports:
- "5050:80"
volumes: #host:container is the format.
#The volume with server login information.
- ./pgadmin4/servers.json:/pgadmin4/servers.json
#Checklist for production
# uncomment restart: always in both services.
# add a python environment to run data collection etc