Skip to content

Commit 7acc038

Browse files
task: add database and configurations to docker-compose.yaml (#36)
* task: enhance docker-compose.yaml definition Signed-off-by: Carlos Feria <[email protected]> * reduce start_period Signed-off-by: Carlos Feria <[email protected]> * fix: update backend image --------- Signed-off-by: Carlos Feria <[email protected]>
1 parent 365c659 commit 7acc038

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
CONSOLE_IMAGE=quay.io/securesign/rhtas-console@sha256:c822f8e3c95b4ca1c36221fc617a8cd3606ba7073b2df1118861a34a1d20dfc5
1+
CONSOLE_IMAGE=quay.io/securesign/rhtas-console@sha256:75966d60ed709af33efd48c53b96ea7b2fcd4608f90ccc56885bf224e34b55f5
22
CONSOLE_UI_IMAGE=quay.io/securesign/rhtas-console-ui@sha256:c0b0b2d76548c05efadb2425baf93609cf6c40180f170cb531fbb7689a91db31
3+
CONSOLE_DB_IMAGE=mariadb:lts-ubi
4+

docker-compose.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,34 @@ networks:
22
console:
33

44
services:
5+
console-db:
6+
image: ${CONSOLE_DB_IMAGE}
7+
environment:
8+
MYSQL_ROOT_PASSWORD: rootpassword
9+
MYSQL_DATABASE: tuf_trust
10+
MYSQL_USER: rootuser
11+
MYSQL_PASSWORD: root
12+
networks:
13+
- console
14+
healthcheck:
15+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-prootpassword"]
16+
interval: 10s # how often to check
17+
timeout: 5s # max time to wait for one check
18+
retries: 5 # how many failures before unhealthy
19+
start_period: 15s # time to wait before starting checks
20+
521
console:
622
image: ${CONSOLE_IMAGE}
723
ports:
824
- "8087:8080"
25+
environment:
26+
DB_DSN: rootuser:root@tcp(console-db:3306)/tuf_trust
27+
TUF_REPO_URL: https://tuf-repo-cdn.sigstore.dev
928
networks:
1029
- console
30+
depends_on:
31+
console-db:
32+
condition: service_healthy
1133

1234
console-ui:
1335
image: ${CONSOLE_UI_IMAGE}

0 commit comments

Comments
 (0)