-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: David Roher <[email protected]>
- Loading branch information
Showing
16 changed files
with
116 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
CHADWICK_VERSION=v0.9.3 | ||
BASEBALLDATABANK_VERSION=dd1a4503b9d6ec2bdda5e345ba06c867e368dd13 | ||
RETROSHEET_VERSION=e540755f22b65d2f85f4da9180d1a31754c331f9 | ||
CHADWICK_VERSION=v0.9.5 | ||
BASEBALLDATABANK_VERSION=ccb3cef05e68f0085db4ada6d4a9ebab9435b452 | ||
RETROSHEET_VERSION=48334a58f7446d59746d81aa73c3e9fa9b2676e9 | ||
|
||
EXTRACT_DIR=extract | ||
REPO=doublewick/boxball | ||
VERSION=2022.0.0 | ||
VERSION=2023.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
ARG VERSION | ||
FROM doublewick/boxball:ddl-${VERSION} as ddl | ||
|
||
FROM yandex/clickhouse-server:22.9.7.34 as clickhouse | ||
COPY z_load.sh /docker-entrypoint-initdb.d/ | ||
COPY --chown=clickhouse:clickhouse --from=ddl /ddl/clickhouse.sql /docker-entrypoint-initdb.d/ | ||
COPY --chown=clickhouse:clickhouse --from=parquet /transform/parquet /data | ||
|
||
FROM drill/apache-drill:1.17.0 as drill | ||
COPY --from=parquet /transform/parquet /data | ||
|
||
FROM mysql:8.0.31-debian as mysql | ||
ENV MYSQL_ALLOW_EMPTY_PASSWORD=yes | ||
COPY my.cnf /etc/mysql/conf.d/ | ||
COPY A_unzip_csvs.sh z_remove_csvs.sh /docker-entrypoint-initdb.d/ | ||
RUN apt-get update && apt-get install -y --no-install-recommends zstd zip && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
COPY --chown=mysql:mysql --from=ddl /ddl/mysql.sql /docker-entrypoint-initdb.d/ | ||
COPY --chown=mysql:mysql --from=csv /transform/csv /data | ||
|
||
FROM postgres:15.1 as postgres | ||
RUN apt-get update && apt-get install -y --no-install-recommends zstd zip && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
COPY A_build_conf.sql z_run_conf.sql /docker-entrypoint-initdb.d/ | ||
COPY --chown=postgres:postgres --from=ddl /ddl/postgres.sql /docker-entrypoint-initdb.d/ | ||
COPY --chown=postgres:postgres --from=csv /transform/csv /data | ||
|
||
FROM postgres:13.2 as postgres-cstore-fdw-build | ||
RUN apt-get update && apt-get install -y --no-install-recommends postgresql-server-dev-13 build-essential zstd libprotobuf-c-dev protobuf-c-compiler wget ca-certificates unzip make gcc libpq-dev && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN wget https://github.com/citusdata/cstore_fdw/archive/master.zip -O cstore_fdw.zip && \ | ||
unzip cstore_fdw.zip && \ | ||
mv cstore_fdw-master cstore_fdw | ||
WORKDIR /cstore_fdw | ||
RUN make && \ | ||
make install | ||
WORKDIR / | ||
RUN echo "shared_preload_libraries = 'cstore_fdw'" >> "${PGDATA}/postgresql.conf" | ||
COPY --chown=postgres:postgres --from=ddl /ddl/postgres_cstore_fdw.sql /docker-entrypoint-initdb.d/ | ||
COPY --chown=postgres:postgres --from=csv /transform/csv /data | ||
RUN cat /docker-entrypoint-initdb.d/postgres_cstore_fdw.sql | ||
|
||
FROM postgres-cstore-fdw-build as postgres-cstore-fdw | ||
|
||
FROM alpine:3.17 as sqlite-build | ||
RUN apk add --no-cache \ | ||
zstd \ | ||
sqlite | ||
RUN sqlite3 boxball.db ".databases" | ||
COPY --from=ddl /ddl/sqlite.sql . | ||
COPY --from=csv /transform/csv /data | ||
RUN echo "Decompressing fies..." && \ | ||
for f in /data/**/*.csv.zst; do zstd --rm -d ${f}; done && \ | ||
echo "Building db..." && \ | ||
< sqlite.sql sqlite3 -bail -echo boxball.db && \ | ||
rm -rf /data && \ | ||
zstd --rm boxball.db | ||
|
||
|
||
FROM python:3.11-alpine3.17 AS sqlite | ||
RUN apk add --no-cache \ | ||
zstd \ | ||
sqlite | ||
RUN pip install sqlite-web==0.4.1 | ||
COPY --from=build boxball.db.zst /tmp/ | ||
ENTRYPOINT zstd --rm -d /tmp/boxball.db.zst -fo /db/boxball.db && sqlite_web -H 0.0.0.0 -x /db/boxball.db |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
pyhumps==1.6.1 | ||
zstandard==0.15.2 | ||
SQLAlchemy==1.3.23 | ||
pyhumps==3.8.0 | ||
zstandard==0.19.0 | ||
SQLAlchemy==1.4.45 | ||
sqlalchemy-fdw==0.3.0 | ||
clickhouse-sqlalchemy==0.1.5 | ||
pyarrow==3.0.0 | ||
pytest==6.2.2 | ||
pytest-cov==2.11.1 | ||
clickhouse-sqlalchemy==0.2.3 | ||
pyarrow==10.0.1 | ||
pytest==7.2.0 | ||
pytest-cov==4.0.0 | ||
codacy-coverage==1.3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
SQLAlchemy==1.3.23 | ||
sqlalchemy-fdw==0.3.0 | ||
clickhouse-sqlalchemy==0.1.5 | ||
pyarrow==7.0.0 | ||
pyarrow==10.0.1 | ||
zstandard==0.17.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters