Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic/use empty fixture #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker_template_db.sql
empty_fixture.sql
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM postgres:12.3

ENV POSTGRES_PASSWORD=postgres
ADD run.sh /docker-entrypoint-initdb.d
ADD sql /docker-entrypoint-initdb.d/

RUN apt-get update
RUN apt-get install -y wget
RUN rm -rf /var/lib/apt/lists/*
RUN wget https://raw.githubusercontent.com/solgenomics/sgn/master/t/data/fixture/empty_fixture.sql

ADD run.sh /docker-entrypoint-initdb.d/
Binary file removed docker_template_db.sql.gz
Binary file not shown.
10 changes: 8 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
set -e

psql -v ON_ERROR_STOP=1 --username "postgres" <<-EOSQL
CREATE ROLE web_usr;
EOSQL
CREATE USER web_usr;
ALTER USER web_usr WITH PASSWORD 'postgres';
ALTER ROLE web_usr WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS;
CREATE DATABASE breedbase;
GRANT ALL PRIVILEGES ON DATABASE breedbase TO web_usr;
EOSQL

psql -U postgres -d breedbase -f empty_fixture.sql
127 changes: 0 additions & 127 deletions sql/data/metadata.md_dbversion.sql

This file was deleted.

3 changes: 0 additions & 3 deletions sql/data/metadata.md_image.sql

This file was deleted.

173 changes: 0 additions & 173 deletions sql/data/metadata.md_metadata.sql

This file was deleted.

32 changes: 0 additions & 32 deletions sql/data/public.cv.sql

This file was deleted.

Loading