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 db: image: timescale/timescaledb:2.2.0-pg11 volumes: - timescaledb:/var/lib/postgresql/data:z 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 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: - "80:80" depends_on: - redis - db - rabbitmq api_compat: image: web command: python3 /code/listenbrainz/manage.py run_api_compat_server -h 0.0.0.0 -p 8080 -d ports: - "8080:8080" volumes: - ..:/code/listenbrainz:z depends_on: - redis - 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 8082 ports: - "8082:8082" 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