services:

  openscad-preview:
    build:
      context: ./
      dockerfile: ./openscad/Dockerfile
    image: openscad
    command: openscad.preview
    ports:
      - "5052:8080"
    environment:
      AWS_SECRET_ACCESS_KEY: "${DEV_AWS_SECRET_ACCESS_KEY}"
      AWS_ACCESS_KEY_ID: "${DEV_AWS_ACCESS_KEY_ID}"
      BUCKET: "${DEV_BUCKET}"

  openscad-stl:
    image: openscad
    command: openscad.stl
    ports:
      - "5053:8080"
    environment:
      AWS_SECRET_ACCESS_KEY: "${DEV_AWS_SECRET_ACCESS_KEY}"
      AWS_ACCESS_KEY_ID: "${DEV_AWS_ACCESS_KEY_ID}"
      BUCKET: "${DEV_BUCKET}"

  cadquery-stl:
    build:
      context: ./
      dockerfile: ./cadquery/Dockerfile
    command: cadquery.stl
    ports:
      - 5060:8080
    environment:
      AWS_SECRET_ACCESS_KEY: "${DEV_AWS_SECRET_ACCESS_KEY}"
      AWS_ACCESS_KEY_ID: "${DEV_AWS_ACCESS_KEY_ID}"
      BUCKET: "${DEV_BUCKET}"

