Skip to content
Snippets Groups Projects
Commit d812839f authored by Jayesh's avatar Jayesh :cat2:
Browse files

Add GraphQL service to SWH environment

Add swh-graphql to the Dockerfile with default configuration
parent a238b8e2
No related branches found
No related tags found
1 merge request!189Add GraphQL service to SWH environment
......@@ -51,6 +51,10 @@ fixups =
grep -q pre-commit.com .git/hooks/pre-commit || pre-commit install
grep -q pre-commit.com .git/hooks/commit-msg || pre-commit install -t commit-msg
[swh-graphql]
checkout = git clone 'https://forge.softwareheritage.org/source/swh-graphql.git' 'swh-graphql'
fixups = grep -q pre-commit.com .git/hooks/pre-commit || pre-commit install
[swh-icinga-plugins]
checkout = git clone 'https://forge.softwareheritage.org/source/swh-icinga-plugins.git' 'swh-icinga-plugins'
fixups =
......
......@@ -69,6 +69,7 @@ RUN pip install \
swh-core[db,http] \
swh-counters \
swh-deposit[server] \
swh-graphql \
swh-indexer \
swh-journal \
swh-lister \
......
storage:
cls: remote
url: http://swh-storage:5002
debug: yes
version: "2.1"
services:
swh-graphql:
image: swh/stack
build: ./
depends_on:
- swh-storage
ports:
- 5013:5013
environment:
SWH_CONFIG_FILENAME: /graphql.yml
env_file:
- ./env/common_python.env
volumes:
- "./conf/graphql.yml:/graphql.yml:ro"
- "./services/swh-graphql/entrypoint.sh:/entrypoint.sh:ro"
entrypoint: /entrypoint.sh
#!/bin/bash
set -e
source /srv/softwareheritage/utils/pyutils.sh
setup_pip
case "$1" in
"shell")
exec bash -i
;;
*)
echo Starting the swh-graphql API server
exec gunicorn --bind 0.0.0.0:5013 \
--reload \
--threads 4 \
--workers 2 \
--log-level DEBUG \
--timeout 3600 \
--config 'python:swh.core.api.gunicorn_config' \
'swh.graphql.server:make_app_from_configfile()'
;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment