Skip to content
This repository was archived by the owner on Sep 19, 2019. It is now read-only.

Commit

Permalink
Updated postgres init script
Browse files Browse the repository at this point in the history
  • Loading branch information
7imbrook committed Feb 3, 2016
1 parent eda5abf commit 90773cf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.DS_Store
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pgapi:
build: ./services/postgrest
dockerfile: Dockerfile.interface
restart: always
links:
- db
ports:
Expand Down
5 changes: 3 additions & 2 deletions services/postgrest/Dockerfile.interface
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ FROM haskell
RUN apt-get update -y
RUN apt-get install -y postgresql-9.4

ADD https://github.com/begriffs/postgrest/releases/download/v0.3.0.3/postgrest-0.3.0.3-ubuntu.tar.xz /
RUN tar -xf postgrest-0.3.0.3-ubuntu.tar.xz
# ADD https://github.com/begriffs/postgrest/releases/download/v0.3.0.3/postgrest-0.3.0.3-ubuntu.tar.xz /
# RUN tar -xf postgrest-0.3.0.3-ubuntu.tar.xz

COPY ./postgrest /postgrest
COPY ./entrypoint.sh /entrypoint.sh

EXPOSE 3000
Expand Down
10 changes: 9 additions & 1 deletion services/postgrest/init.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
-- Make things in the projects DB
\c projects

BEGIN;

CREATE TABLE acconts
(
id serial PRIMARY KEY,
prefered_name varchar(80),
email varchar(80)
);

CREATE TABLE requests
(
id serial PRIMARY KEY,
title text NOT NULL,
year date NOT NULL
created date NOT NULL
);

COMMIT;
Binary file added services/postgrest/postgrest
Binary file not shown.

0 comments on commit 90773cf

Please sign in to comment.