diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ ALL_DOCKERFILES := $(wildcard dockerfiles/Dockerfile-*) ALL_BUILD_TARGETS := $(subst dockerfiles/Dockerfile-,build-,$(ALL_DOCKERFILES)) -all: $(ALL_BUILD_TARGETS) +build: $(ALL_BUILD_TARGETS) -run: $(ALL_BUILD_TARGETS) +rebuild: $(ALL_BUILD_TARGETS) # Discard existing volumes docker-compose down --volumes + make run + +run: # Runs containers in the foreground docker-compose up diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ [Work in progress] -This repo contains Dockerfiles to allow developers to run a small Software Heritage instance on their development computer. +This repo contains Dockerfiles to allow developers to run a small +Software Heritage instance on their development computer. + +The end goal is to smooth the contributors/developers workflow. Focus +on coding, not configuring! ## How to use @@ -13,3 +17,18 @@ This will build docker images and run them using docker-compose. Press Ctrl-C when you want to stop it. + +## Details + +This runs the following services on their respectively standard ports: + +- swh-objstorage + +- a `softwareheritage` instance db + +- swh-storage (plugged to communicate with the objstorage and the db) + +That means, you can start doing the ingestion using those services +using the same setup described in the getting-started [1]. + +[1] https://docs.softwareheritage.org/devel/getting-started.html#step-4-ingest-repositories diff --git a/docker-compose.yml b/docker-compose.yml --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,9 @@ image: swh-storage ports: - 5002:5002 + depends_on: + - pgsql-storage + - swh-objstorage swh-objstorage: image: swh-objstorage diff --git a/dockerfiles/Dockerfile-swh-objstorage b/dockerfiles/Dockerfile-swh-objstorage --- a/dockerfiles/Dockerfile-swh-objstorage +++ b/dockerfiles/Dockerfile-swh-objstorage @@ -1,7 +1,9 @@ FROM python:3 -RUN apt-get update -RUN apt-get install -y libsystemd-dev +RUN \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y libsystemd-dev RUN mkdir -p /srv/softwareheritage/objects diff --git a/dockerfiles/Dockerfile-swh-storage b/dockerfiles/Dockerfile-swh-storage --- a/dockerfiles/Dockerfile-swh-storage +++ b/dockerfiles/Dockerfile-swh-storage @@ -1,7 +1,9 @@ FROM python:3 -RUN apt-get update -RUN apt-get install -y libsystemd-dev +RUN \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y libsystemd-dev WORKDIR /usr/local/src/ COPY ./swh-storage/requirements*.txt ./swh-storage/