version: "3.4" # IMPORTANT NOTE: Volume paths mounted on containers are relative to the # directory that this file is in (`docker/`) and so probably need to start with # `../` to refer to a directory in the main code checkout volumes: redis: timescaledb: rabbitmq: # The contents of /root, so that bash and ipython can store history web_home: services: redis: image: redis:6.2.2 volumes: - redis:/data:z lb_db: image: timescale/timescaledb:2.2.0-pg11 volumes: - timescaledb:/var/lib/postgresql/data:z ports: - "127.0.0.1:7432:5432" environment: POSTGRES_PASSWORD: 'postgres' rabbitmq: image: rabbitmq:3.8.16 volumes: - rabbitmq:/var/lib/rabbitmq:z web: build: context: .. dockerfile: Dockerfile target: listenbrainz-dev args: GIT_COMMIT_SHA: HEAD environment: FLASK_APP: listenbrainz.webserver:create_web_app() FLASK_ENV: development command: flask run -h 0.0.0.0 -p 80 image: web volumes: - web_home:/root - ..:/code/listenbrainz:z - ../listenbrainz/webserver/static:/static ports: - "8100:80" depends_on: - redis - lb_db - rabbitmq api_compat: image: web environment: FLASK_APP: listenbrainz.webserver:create_api_compat_app() FLASK_ENV: development command: flask run -h 0.0.0.0 -p 8101 ports: - "8101:8101" volumes: - ..:/code/listenbrainz:z depends_on: - redis - lb_db - rabbitmq timescale_writer: image: web command: python3 -m "listenbrainz.timescale_writer.timescale_writer" volumes: - ..:/code/listenbrainz:z depends_on: - redis - rabbitmq spotify_reader: image: web volumes: - ..:/code/listenbrainz:z command: python3 -m "listenbrainz.spotify_updater.spotify_read_listens" depends_on: - redis - rabbitmq websockets: image: web volumes: - ..:/code/listenbrainz:z command: python manage.py run_websockets -h 0.0.0.0 -p 8102 ports: - "8102:8102" depends_on: - redis - rabbitmq static_builder: build: context: .. dockerfile: docker/Dockerfile.webpack command: npm run build:dev volumes: # Mount source front-end files - ../listenbrainz/webserver/static:/code/static:z # We mount this as a sort of shared volume # where we put the compiled output to be served by the service "web" - ../listenbrainz/webserver/static:/static:z # Uncomment the following lines if you want to connect the LB network to a musicbrainz-docker network to access a MB replica # TODO: re-comment these before merging this code #networks: # default: # name: musicbrainz-docker_default # external: true