services:
  lxc:
    container_name: ${CONTAINER_NAME}
    deploy:
      resources:
        limits:
          cpus: ${CPUS}
          memory: ${MEMORY_LIMIT}
    restart: always
    networks:
      - 1panel-network
    ports:
      - "${PANEL_APP_PORT_HTTP}:22"
      - "${EXTERNAL_PORT}:${INTERNAL_PORT}"
    volumes:
      - "${EXTERNAL_DATA1}:${INTERNAL_DATA1}"
      - "${EXTERNAL_DATA2}:${INTERNAL_DATA2}"
    environment:
      - DISTRIBUTION=alpine
      - INITIAL_SSH_KEY=${SSH_KEY}
    hostname: ${LXC_HOSTNAME}
    privileged: true
    image: micwy/lxc:latest
    pull_policy: always
    labels:
      createdBy: "Apps"

networks:
  1panel-network:
    external: true
