8000 PostgreSQL deployment example by robstradling · Pull Request #3675 · google/trillian · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PostgreSQL deployment example #3675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Storage

* Add PostgreSQL quota manager and storage backend by @robstradling in https://github.com/google/trillian/pull/3644
* PostgreSQL deployment example by @robstradling in https://github.com/google/trillian/pull/3675

### Misc

Expand Down
5 changes: 5 additions & 0 deletions examples/deployment/docker/db_server/postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM postgres:latest

# expects the build context to be: $GOPATH/src/github.com/google/trillian
COPY storage/postgresql/schema/storage.sql /docker-entrypoint-initdb.d/storage.sql
RUN chmod -R 775 /docker-entrypoint-initdb.d
52 changes: 52 additions & 0 deletions examples/deployment/postgresql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '3.1'
services:
postgresql:
build:
context: ../../..
dockerfile: examples/deployment/docker/db_server/postgresql/Dockerfile
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRESQL_DATABASE=defaultdb
- POSTGRESQL_USER=test
- POSTGRESQL_PASSWORD=zaphod
restart: always # keep the PostgreSQL server running
trillian-log-server:
build:
context: ../../..
dockerfile: examples/deployment/docker/log_server/Dockerfile
args:
- GOFLAGS
command: [
"--quota_system=postgresql",
"--storage_system=postgresql",
"--postgresql_uri=postgresql:///defaultdb?host=localhost&user=test&password=zaphod",
"--rpc_endpoint=0.0.0.0:8090",
"--http_endpoint=0.0.0.0:8091",
"--alsologtostderr",
]
restart: always # retry while PostgreSQL is starting up
ports:
- "8090:8090"
- "8091:8091"
depends_on:
- postgresql
trillian-log-signer:
build:
context: ../../..
dockerfile: examples/deployment/docker/log_signer/Dockerfile
args:
- GOFLAGS
command: [
"--quota_system=postgresql",
"--storage_system=postgresql",
"--postgresql_uri=postgresql:///defaultdb?host=localhost&user=test&password=zaphod",
"--rpc_endpoint=0.0.0.0:8090",
"--http_endpoint=0.0.0.0:8091",
"--force_master",
"--alsologtostderr",
]
restart: always # retry while PostgreSQL is starting up
ports:
- "8092:8091"
depends_on:
- postgresql
Loading
0