feat: create cameleer-postgres image with init script baked in
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
3
docker/cameleer-postgres/Dockerfile
Normal file
3
docker/cameleer-postgres/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM postgres:16-alpine
|
||||
COPY init-databases.sh /docker-entrypoint-initdb.d/init-databases.sh
|
||||
RUN chmod +x /docker-entrypoint-initdb.d/init-databases.sh
|
||||
9
docker/cameleer-postgres/init-databases.sh
Normal file
9
docker/cameleer-postgres/init-databases.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE DATABASE logto;
|
||||
CREATE DATABASE cameleer3;
|
||||
GRANT ALL PRIVILEGES ON DATABASE logto TO $POSTGRES_USER;
|
||||
GRANT ALL PRIVILEGES ON DATABASE cameleer3 TO $POSTGRES_USER;
|
||||
EOSQL
|
||||
Reference in New Issue
Block a user