version: "3.9" services: postgresql: image: postgres:alpine container_name: "postgresql" environment: - "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" volumes: - ./data:/var/lib/postgresql/data networks: - database networks: database: external: true