8 lines
453 B
Bash
Executable file
8 lines
453 B
Bash
Executable file
#!/bin/bash
|
|
|
|
source .env
|
|
source ../core/.env
|
|
|
|
docker exec postgres psql -U $POSTGRES_USER -d postgres -c "CREATE USER $ONLYOFFICE_DB_USER WITH PASSWORD '$ONLYOFFICE_DB_PASSWORD';"
|
|
docker exec postgres psql -U $POSTGRES_USER -d postgres -c "CREATE DATABASE $ONLYOFFICE_DB_NAME OWNER $ONLYOFFICE_DB_USER;"
|
|
docker exec postgres psql -U $POSTGRES_USER -d $ONLYOFFICE_DB_NAME -c "GRANT ALL PRIVILEGES ON DATABASE $ONLYOFFICE_DB_NAME TO $ONLYOFFICE_DB_USER;"
|