Skip to content

Commit d3da330

Browse files
committed
download eql directly from releases in eql and install
1 parent 5369e2c commit d3da330

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

languages/go/xorm/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
services:
22
postgres:
33
container_name: gotest_pg
4+
build:
5+
context: ./init-db
46
image: postgres:16.2-bookworm
57
environment:
68
POSTGRES_USER: postgres

languages/go/xorm/init-db/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM curlimages/curl:7.85.0 as fetch-eql
2+
WORKDIR /out
3+
RUN curl -sLo /out/cipherstash-encrypt.sql https://github.com/cipherstash/encrypt-query-language/releases/download/eql-0.4.0/cipherstash-encrypt.sql
4+
5+
FROM postgres:16 as db
6+
WORKDIR /app
7+
COPY init.sh /docker-entrypoint-initdb.d
8+
COPY create-db.sql /app/scripts/db/create-db.sql
9+
COPY --from=fetch-eql /out/cipherstash-encrypt.sql /app/scripts/db/cipherstash-encrypt.sql

languages/go/xorm/init-db/init.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
psql -U $POSTGRES_USER -d postgres -f /app/scripts/db/create-db.sql
4+
psql -U $POSTGRES_USER -d gotest -a -f /app/scripts/db/cipherstash-encrypt.sql

0 commit comments

Comments
 (0)