AusSRC / WALLABY_database

Database schema for the WALLABY science post-processing
GNU Lesser General Public License v2.1
0 stars 4 forks source link

Postgresql data should not be persisted in container #4

Closed davepallot closed 1 year ago

davepallot commented 2 years ago

The database should be mapping data to the host machine in order to persist through container cycles. If the container is deleted, for example, the data is lost.

docker-compose.yml

version: '3.5'

services:
  wallaby_db:
    build: .
    image: wallaby_db
    container_name: wallaby_db
    env_file:
      - psql.env
    ports:
      - 5432:5432
    networks:
      - wallaby_network

networks:
  wallaby_network:
    name: wallaby_network
    driver: bridge

Should include:

    volumes:
      - /data:/var/lib/postgresql/data

The data will need to be migrated to the host for a restart.

axshen commented 1 year ago

Resolved