Skip to content

Commit efd0c33

Browse files
committed
--init : setup for database using postgres
0 parents  commit efd0c33

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

database/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM postgres
2+
COPY init.sql /docker-entrypoint-initdb.d

database/init.sql

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CREATE TABLE apparel(
2+
name character varying(50)
3+
);
4+
5+
INSERT INTO apparel (name) VALUES
6+
('Helmet'),
7+
('Boots'),
8+
('Jacket');
9+

docker-compose.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version : '3'
2+
3+
services:
4+
databse:
5+
build: ./database

0 commit comments

Comments
 (0)