remove bff
This commit is contained in:
@@ -2,14 +2,16 @@ version: '3.7'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:13.5
|
||||
build:
|
||||
context: .
|
||||
dockerfile: local_up.Dockerfile
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_DB=como
|
||||
- POSTGRES_USER=como
|
||||
- POSTGRES_PASSWORD=somenotverysecurepassword
|
||||
- DATABASE_URL="postgres://como:somenotverysecurepassword@localhost:5432/como"
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
8
templates/init-user-db.sh
Normal file
8
templates/init-user-db.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER como WITH PASSWORD 'somenotverysecurepassword';
|
||||
CREATE DATABASE como;
|
||||
GRANT ALL PRIVILEGES ON DATABASE como TO como;
|
||||
EOSQL
|
3
templates/local_up.Dockerfile
Normal file
3
templates/local_up.Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM postgres:14-alpine
|
||||
|
||||
COPY *.sh /docker-entrypoint-initdb.d/
|
Reference in New Issue
Block a user