-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move test SSLs to a package
- Loading branch information
Showing
12 changed files
with
70 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM postgres:16 | ||
|
||
RUN mkdir -p /etc/postgresql/certs && chown postgres:postgres /etc/postgresql/certs | ||
|
||
# Copy the SSL certificates into the container | ||
COPY root.crt /etc/postgresql/certs/root.crt | ||
COPY slonik.key /etc/postgresql/certs/server.key | ||
COPY slonik.crt /etc/postgresql/certs/server.crt | ||
|
||
|
||
RUN chmod 600 /etc/postgresql/certs/server.key && \ | ||
chmod 644 /etc/postgresql/certs/server.crt /etc/postgresql/certs/root.crt && \ | ||
chown postgres:postgres /etc/postgresql/certs/* | ||
|
||
RUN echo "ssl = on" >> /usr/share/postgresql/postgresql.conf.sample && \ | ||
echo "ssl_cert_file = '/etc/postgresql/certs/server.crt'" >> /usr/share/postgresql/postgresql.conf.sample && \ | ||
echo "ssl_key_file = '/etc/postgresql/certs/server.key'" >> /usr/share/postgresql/postgresql.conf.sample && \ | ||
echo "ssl_ca_file = '/etc/postgresql/certs/root.crt'" >> /usr/share/postgresql/postgresql.conf.sample | ||
|
||
EXPOSE 5432 | ||
|
||
USER postgres |
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 @@ | ||
{ | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "Gajus Kuizinas", | ||
"url": "http://gajus.com" | ||
}, | ||
"description": "SSLs used for testing Slonik.", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"name": "@slonik/test-ssls", | ||
"peerDependencies": { | ||
"zod": "^3" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/gajus/slonik" | ||
}, | ||
"version": "46.2.0" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.