services:
  timelapse-api:
    image: node:latest
    container_name: timelapse-api
    ports:
      - "8053:3000"
    volumes:
      - /home/timelapse/backend:/backend
      - /home/timelapse/storage:/storage
    environment:
      - NODE_VERSION=22.9.0
      - YARN_VERSION=1.22.22
    working_dir: /backend
    command: /bin/bash -c "npm install && npm run dev"
    restart: always
    networks:
      - bridge
      - timelapse_network

networks:
  bridge:
    driver: bridge
  timelapse_network:
    driver: bridge
