Hello, all quiet people?
I am moving with docker-compose configuring a system with docker I am mapping volumes with * .sh files in the/docker-entrypoint-initdb.d/
directory to start the basic settings of my bank:
version: '3.1'
services:
db:
image: postgres:9.6
ports:
- '5432:5432'
environment:
POSTGRES_DB: 'imn'
POSTGRES_PASSWORD: 'intelbras'
POSTGRES_USER: 'intelbras'
volumes:
- ./init:/docker-entrypoint-initdb.d/
Inside the init folder I have a * .sh script running to create the schema
#!/bin/bash
set -e
psql -v --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE SCHEMA imn AUTHORIZATION intelbras
EOSQL
When I use the
docker-compose up
It goes up the bank but does not create the schema could someone tell me where I'm doing wrong?