Skip to content

Commit e1fefbb

Browse files
author
Joaquin Gutierrez
committed
build: adapt to new CLI approach for the project
1 parent c48a505 commit e1fefbb

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ COPY --from=useradd /etc/group /etc/group
3939
COPY --from=useradd /etc/passwd /etc/passwd
4040
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
4141
USER nonroot:nonroot
42-
ENTRYPOINT ["/app/centralwebhook"]
42+
ENTRYPOINT ["/app/centralwebhook", "install"]

compose.webhook.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,31 @@ services:
1212
timeout: 5s
1313
retries: 10
1414

15-
# Override the image used to contain the `pgsql-http` extension
15+
# Override the image used to contain the `pgsql-http` extension and a healthcheck
1616
postgres14:
1717
image: "ghcr.io/hotosm/postgres:14-http"
1818

19+
healthcheck:
20+
test: pg_isready -U ${DB_USER:-odk} || exit 1
21+
start_period: 10s
22+
interval: 5s
23+
timeout: 5s
24+
retries: 5
25+
1926
# The main webhook service
2027
webhook:
21-
image: "ghcr.io/hotosm/central-webhook:0.2.0"
28+
image: "ghcr.io/hotosm/central-webhook:1.0.2"
2229
environment:
2330
CENTRAL_WEBHOOK_DB_URI: postgresql://odk:odk@postgres14:5432/odk?sslmode=disable
2431
CENTRAL_WEBHOOK_UPDATE_ENTITY_URL: ${CENTRAL_WEBHOOK_UPDATE_ENTITY_URL}
2532
CENTRAL_WEBHOOK_REVIEW_SUBMISSION_URL: ${CENTRAL_WEBHOOK_REVIEW_SUBMISSION_URL}
2633
CENTRAL_WEBHOOK_NEW_SUBMISSION_URL: ${CENTRAL_WEBHOOK_NEW_SUBMISSION_URL}
2734
CENTRAL_WEBHOOK_API_KEY: ${CENTRAL_WEBHOOK_API_KEY}
2835
CENTRAL_WEBHOOK_LOG_LEVEL: ${CENTRAL_WEBHOOK_LOG_LEVEL:-INFO}
36+
# It waits for everything to be ready to install the trigger
2937
depends_on:
3038
postgres14:
31-
condition: service_started
39+
condition: service_healthy
3240
service:
33-
condition: service_started
34-
restart: always
41+
condition: service_healthy
42+
restart: on-failure

0 commit comments

Comments
 (0)