Skip to content

Commit

Permalink
Fix docker-compose file (#1560)
Browse files Browse the repository at this point in the history
* Make config path configurable

Add environment variable FULCIO_CONFIG to allow providing an alternate
configuration file rather than overwriting the default one. If a testing
environment overwrote the git-committed config/config.jsn, it would
pollute the repository checkout and be difficult to reuse on subsequent
test runs.

Signed-off-by: Colleen Murphy <colleenmurphy@google.com>

* Add persistent volume for mysql

The ctfe_init container uses a persistent volume to store the tree head
ID among other things from previous runs. However, the mysql container
is not guaranteed to reuse the same data directory when it is destroyed
and recreated, so it may come up empty. When this happens, but the CT
log is configured for an existing tree, then signing objects will fail
with a Not Found error. This change adds a persistent volume to the
docker-compose file for mysql so that the database can live on and be
consistent with the CT log's configuration.

Signed-off-by: Colleen Murphy <colleenmurphy@google.com>

---------

Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
  • Loading branch information
cmurphy authored Feb 6, 2024
1 parent 4a80ee6 commit dfcb1eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
- "${FULCIO_METRICS_PORT:-2112}:2112"
volumes:
- ~/.config/gcloud:/root/.config/gcloud/:z # for GCP authentication
- ./config/config.jsn:/etc/fulcio-config/config.json:z
- ${FULCIO_CONFIG:-./config/config.jsn}:/etc/fulcio-config/config.json:z
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5555/healthz"]
interval: 10s
Expand Down Expand Up @@ -109,6 +109,8 @@ services:
timeout: 3s
retries: 3
start_period: 10s
volumes:
- mysql:/var/lib/mysql
trillian-log-server:
image: gcr.io/trillian-opensource-ci/log_server
command: [
Expand Down Expand Up @@ -141,3 +143,4 @@ services:
- mysql
volumes:
ctfeConfig: {}
mysql: {}

0 comments on commit dfcb1eb

Please sign in to comment.