-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable SSL on local dev DB; clean up local dev stack
- Loading branch information
1 parent
a5eafb1
commit b1cf2fe
Showing
7 changed files
with
34 additions
and
29 deletions.
There are no files selected for viewing
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
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,6 @@ | ||
# For best results, match version in use by cloud.gov RDS | ||
FROM postgres:12 | ||
|
||
ADD generate-cert.sh /tmp/generate-cert.sh | ||
|
||
RUN /tmp/generate-cert.sh |
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Generating SSL certificate..." | ||
|
||
set -euo pipefail | ||
|
||
openssl req \ | ||
-new -x509 -days 3650 -nodes \ | ||
-subj /CN=localhost \ | ||
-out /var/lib/postgresql/server.crt \ | ||
-keyout /var/lib/postgresql/server.key | ||
|
||
chown postgres:postgres /var/lib/postgresql/server.{crt,key} | ||
chmod 600 /var/lib/postgresql/server.{crt,key} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,35 @@ | ||
version: '3.8' | ||
|
||
services: | ||
|
||
redis: | ||
image: redis:6.2-alpine | ||
ports: | ||
- "6379:6379" | ||
|
||
db: | ||
image: postgres:12 # For best results, match version in use by cloud.gov RDS | ||
build: | ||
context: ./dev/db | ||
command: > | ||
-c ssl=on | ||
-c ssl_cert_file=/var/lib/postgresql/server.crt | ||
-c ssl_key_file=/var/lib/postgresql/server.key | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
- POSTGRES_PASSWORD=postgres | ||
|
||
adminer: | ||
image: adminer | ||
ports: | ||
- "8432:8080" | ||
depends_on: | ||
- db | ||
|
||
uaa: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.uaadev | ||
context: ./dev/uaa | ||
ports: | ||
- "8080:8080" | ||
volumes: | ||
- ./uaadev.yml:/tmp/uaa/uaa/src/main/resources/uaa.yml:ro | ||
# api: | ||
# build: | ||
# context: . | ||
# ports: | ||
# - "8000:8000" | ||
# volumes: | ||
# - ./:/usr/src/app | ||
# depends_on: | ||
# - redis | ||
# - db | ||
# web: | ||
# build: | ||
# context: ./training-front-end | ||
# ports: | ||
# - "3000:3000" | ||
# volumes: | ||
# - ./training-front-end:/usr/src/app | ||
- ./dev/uaa/uaa.yml:/tmp/uaa/uaa/src/main/resources/uaa.yml:ro |