Skip to content

Commit 25082a4

Browse files
author
federico silva
committedDec 27, 2018
replace graphiql with playground, add docker-compose with postgresql and init scripts
1 parent 6b60fce commit 25082a4

File tree

12 files changed

+623
-171
lines changed

12 files changed

+623
-171
lines changed
 

‎build.sbt

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,6 @@ lazy val core = project
105105
"org.http4s" %% "http4s-circe" % http4sVersion,
106106
"io.circe" %% "circe-optics" % circeVersion,
107107
"org.slf4j" % "slf4j-simple" % slf4jVersion
108-
)
108+
),
109+
109110
)

‎docker-compose.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use postgres/example user/password credentials
2+
version: '3.1'
3+
4+
services:
5+
6+
db:
7+
image: postgres
8+
restart: always
9+
environment:
10+
POSTGRES_USER: user
11+
POSTGRES_PASSWORD: password
12+
POSTGRES_DB: world
13+
ports:
14+
- 5432:5432
15+
volumes:
16+
- ./init/:/docker-entrypoint-initdb.d/
17+
18+
adminer:
19+
image: adminer
20+
restart: always
21+
ports:
22+
- 8686:8080

‎init/01-tables.sql

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
create table cities
2+
(
3+
id serial primary key not null,
4+
name varchar(100) not null,
5+
country_id varchar(2) not null,
6+
district varchar(20) not null,
7+
population bigint
8+
);

‎init/02-cities-data.sql

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
INSERT INTO cities (name, country_id, district, population)
3+
values
4+
('Montevideo', 'UY', 'Montevideo', 150000),
5+
('Paysandú', 'UY', 'Paysandú', 75000),
6+
('New York', 'US', 'New York', 8623000000),
7+
('San Francisco', 'US', 'California', 884363 )

‎modules/core/src/main/resources/assets/graphiql.html

-155
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.