Page MenuHomeSoftware Heritage

storage/entrypoint.sh: Make the storage initialization transparent
ClosedPublic

Authored by ardumont on Dec 14 2018, 12:18 PM.

Details

Summary

The swh-storage startup does initialize the db directly.

Related T1444
Depends on D816 (for idempotency)

Test Plan
docker-compose down --volumes; docker-compose build; docker-compose up

Then load a repository directly (no need for the init step now).

python3 -m swh.loader.git.updater --origin-url https://github.com/SoftwareHeritage/swh-storage.git

For information, to develop this, i used the composability of our
stuff introduced in (D811 \m/):

I added the following docker-compose.override.yml:

version: '2'

services:
  swh-storage:
      volumes:                                                                                                                                                                                         - "${SWH_ENVIRONMENT_HOME}/swh-core:/src/swh-core"

(Note: replace $SWH_ENVIRONMENT_HOME, my local env variable, with
something that works for you)

Diff Detail

Repository
rCDFD Dockerfiles for developers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.