-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
263d091
commit c922f9a
Showing
5 changed files
with
77 additions
and
22 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
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,21 @@ | ||
FROM postgres:12 | ||
|
||
# docker is only used for integration testing, so ignoring security is acceptable | ||
|
||
ENV POSTGRES_USER postgres | ||
ENV POSTGRES_PASSWORD 12345678 | ||
|
||
RUN apt-get update && apt-get install -y build-essential \ | ||
&& apt-get install -y gcc-multilib \ | ||
&& apt-get install -y libpq-dev \ | ||
&& apt-get install -y postgresql-server-dev-12 | ||
|
||
COPY . . | ||
|
||
RUN cc -fPIC -c pgcrypsi.c -I /usr/include/postgresql/12/server/ | ||
RUN cc -shared -o pgcrypsi.so pgcrypsi.o | ||
RUN cp pgcrypsi.so /usr/lib/postgresql/12/lib/ | ||
RUN make USE_PGXS=1 install | ||
|
||
COPY ./scripts/init.sql /docker-entrypoint-initdb.d/ | ||
COPY ./scripts/load_ext.sh /docker-entrypoint-initdb.d/ |
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,5 @@ | ||
CREATE USER superdevuser; | ||
CREATE DATABASE superdevdb; | ||
GRANT ALL PRIVILEGES ON DATABASE superdevdb TO superdevuser; | ||
ALTER USER postgres with PASSWORD '12345678'; | ||
ALTER USER superdevuser with PASSWORD '12345678'; |
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,7 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username postgres --dbname superdevdb <<-EOSQL | ||
CREATE EXTENSION IF NOT EXISTS "pgcrypsi"; | ||
select extname FROM pg_extension; | ||
EOSQL |
File renamed without changes.