Skip to content

Instantly share code, notes, and snippets.

@yvanzo
Last active September 10, 2020 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yvanzo/f759867943ecdc38ac69ff0f95e35d1f to your computer and use it in GitHub Desktop.
Save yvanzo/f759867943ecdc38ac69ff0f95e35d1f to your computer and use it in GitHub Desktop.
Docker Compose override for SIR development setup
ARG PYTHON_VERSION=2.7
FROM metabrainz/python:${PYTHON_VERSION}
ARG PYTHON_VERSION
LABEL org.label-schema.schema-version="1.0.0-rc1" \
org.label-schema.vendor="MetaBrainz Foundation" \
org.metabrainz.based-on-image="metabrainz/python:${PYTHON_VERSION}"
#######################
# From metabrainz/sir #
#######################
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cron \
git \
libpq-dev \
libffi-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev && \
rm -rf /var/lib/apt/lists/*
##################
# Installing sir #
##################
ARG SIR_VERSION=py27-stage1
LABEL org.metabrainz.sir.version="${SIR_VERSION}"
#RUN cd /code && \
# pip install -r requirements.txt
RUN rm -f /code/config.ini
WORKDIR /code
RUN touch /etc/consul-template.conf
ENV POSTGRES_USER musicbrainz
ENV POSTGRES_PASSWORD musicbrainz
version: '3.1'
# Description: Build and run local development copy of SIR
services:
indexer:
build: local/build/sir-dev
env_file:
- ./default/postgres.env
volumes:
- ${SIR_LOCAL_ROOT:?Missing path of sir working copy}:/code
- ${SIR_CONFIG_PATH:-./default/indexer.ini}:/code/config.ini
depends_on:
- db
- mq
- search
@yvanzo
Copy link
Author

yvanzo commented Sep 10, 2020

  1. Create the file sir-dev.yml under local/compose/
  2. Create the file Dockerfile under local/build/sir-dev/
  3. Set SIR_LOCAL_ROOT in the .env file
  4. Run admin/configure add local/compose/sir-dev.yml

See also advanced configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment