new file mode 100755
@@ -0,0 +1,11 @@
+#! /bin/sh
+# Copyright (C) 2023 Garmin Ltd.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Wrapper script to correctly run docker-compose with the correct argument for
+# the hash equivalence server
+
+cd "$(dirname "$0")/../../"
+
+exec docker-compose -f contrib/hashserv/docker-compose.yaml --project-directory . "$@"
new file mode 100644
@@ -0,0 +1,36 @@
+# Copyright (C) 2023 Garmin Ltd.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+
+---
+version: "3.7"
+services:
+ postgresql:
+ image: postgres:16.0
+ restart: always
+ environment:
+ - POSTGRES_DB=hashserver
+ - POSTGRES_USER=postgres
+ - POSTGRES_PASSWORD=postgres
+ volumes:
+ - postgres-data:/var/lib/postgresql/data
+
+ hashserver:
+ build:
+ context: .
+ dockerfile: ./contrib/hashserv/Dockerfile
+ image: bitbake-hashserver:latest
+ restart: always
+ ports:
+ - "9000:9000"
+ environment:
+ - HASHSERVER_LOG_LEVEL=INFO
+ - "HASHSERVER_BIND=ws://0.0.0.0:9000"
+ - "HASHSERVER_DB=postgresql+asyncpg://postgresql:5432/hashserver"
+ - HASHSERVER_DB_USERNAME=postgres
+ - HASHSERVER_DB_PASSWORD=postgres
+ depends_on:
+ - postgresql
+
+volumes:
+ postgres-data:
Adds a docker-compose.yaml file and docker-compose script wrapper to run it with the correct arguments. This can be used to easily standup a hash equivalence server with a postgresql database for demonstration purposes. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- contrib/hashserv/docker-compose | 11 +++++++++ contrib/hashserv/docker-compose.yaml | 36 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100755 contrib/hashserv/docker-compose create mode 100644 contrib/hashserv/docker-compose.yaml