feat: create tables for db on build
This commit is contained in:
parent
6d566f74db
commit
ba5e136dd5
7
PostgreSQL/Dockerfile
Normal file
7
PostgreSQL/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM postgres:17
|
||||
|
||||
WORKDIR /db
|
||||
|
||||
# postgresql will execute the files in that folder after build
|
||||
COPY tables/tables.sql /docker-entrypoint-initdb.d/
|
||||
|
@ -2,6 +2,9 @@ services:
|
||||
database:
|
||||
hostname: database
|
||||
container_name: briques_postgres
|
||||
build:
|
||||
context: ./PostgreSQL
|
||||
dockerfile: Dockerfile
|
||||
image: postgres
|
||||
restart: always
|
||||
environment:
|
||||
@ -11,7 +14,7 @@ services:
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- ./database:/var/lib/postgresql/data
|
||||
- ./dev-db:/var/lib/postgresql/data
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
|
Loading…
x
Reference in New Issue
Block a user