version: "2"

services:
  magneticod:
    build:
      context: .
      dockerfile: Dockerfile.magneticod
    volumes:
      - magneticod-data:/root/.local/share/magneticod
      - magneticod-config:/root/.config/magneticod

  magneticow:
    build:
      context: .
      dockerfile: Dockerfile.magneticow
    volumes:
      - magneticod-data:/root/.local/share/magneticod
    depends_on:
      # It doesn't necessarily "depend" on magneticod, but you would probably like to start them at the same time.
      - magneticod
    ports:
      - "8080:8080"

volumes:
  magneticod-config:

  magneticod-data:
