Implement default psql settings into an initialization script.

master
sigonasr2 4 years ago
parent 56f8602e9e
commit 23093e90bf
  1. 2
      Dockerfile
  2. 3
      docker-compose.yml
  3. 8
      init.sql

@ -0,0 +1,2 @@
FROM library/postgres
COPY init.sql /docker-entrypoint-initdb.d/

@ -14,7 +14,8 @@ services:
ports:
- "35432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_DB: astronomy
POSTGRES_DB: astronomy

@ -0,0 +1,8 @@
create table users(id serial,username text,birth_day integer,birth_month integer,birth_year integer,birth_minute integer,birth_hour integer);
create table signs(id serial,sign_name text,symbol text,strengths text,weaknesses text,element text,ruler text,jewelry text,yinyang boolean);
create table compatibility(id serial,signId integer,compatibleSignId integer);
create table incompatibility(id serial,signId integer,incompatibleSignId integer);
create table numbers(id serial,signId integer,number integer);
create table colors(id serial,signId integer,color text);
create table flowers(id serial,signId integer,flower text);
create table directions(id serial,signId integer,direction integer);
Loading…
Cancel
Save