Skip to content

Commit

Permalink
fix sql scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmdlt committed Nov 23, 2023
1 parent bbaa437 commit 6a26b58
Show file tree
Hide file tree
Showing 5 changed files with 12,039 additions and 24,065 deletions.
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ RUN cat /scripts/salesdb/*.sql > /tmp/sales.sql
RUN echo "psql -U postgres -f /tmp/sales.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d salesdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh

COPY scripts/chartsdb /scripts/chartsdb
COPY scripts/chartsdb/data /scripts/chartsdb/data
RUN cat /scripts/chartsdb/*.sql > /tmp/chartsdb.sql

RUN echo "createdb chartsdb" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d chartsdb -U postgres -f /tmp/chartsdb.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d chartsdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh

ADD scripts/webinars /tmp/

RUN echo "createdb webinarsdb" >> /docker-entrypoint-initdb.d/run.sh
Expand All @@ -23,22 +31,14 @@ RUN echo "createdb marketingdb" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d marketingdb -U postgres -f /tmp/marketingdb.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d marketingdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh

ADD scripts/flightsdb/flightsdb.tar.xz /tmp/
RUN echo "createdb flightsdb" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d flightsdb -U postgres -f /tmp/flightsdb.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d flightsdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh

COPY scripts/setoperationsdb /scripts/setoperationsdb
RUN cat /scripts/setoperationsdb/*.sql > /tmp/setoperationsdb.sql

RUN echo "createdb setoperationsdb" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d setoperationsdb -U postgres -f /tmp/setoperationsdb.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d setoperationsdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh

COPY scripts/chartsdb /scripts/chartsdb
COPY scripts/chartsdb/data /scripts/chartsdb/data
RUN cat /scripts/chartsdb/*.sql > /tmp/chartsdb.sql

RUN echo "createdb chartsdb" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d chartsdb -U postgres -f /tmp/chartsdb.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d chartsdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh
ADD scripts/flightsdb/flightsdb.tar.xz /tmp/
RUN echo "createdb flightsdb" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d flightsdb -U postgres -f /tmp/flightsdb.sql" >> /docker-entrypoint-initdb.d/run.sh
RUN echo "psql -d flightsdb -U postgres -f /scripts/setup_user.sql" >> /docker-entrypoint-initdb.d/run.sh
Loading

0 comments on commit 6a26b58

Please sign in to comment.