# The manifest for the "synapse-generate" job.
# Read the full specification for the "Scheduled Job" type at:
#  https://aws.github.io/copilot-cli/docs/manifest/scheduled-job/

# Your job name will be used in naming your resources like log groups, ECS Tasks, etc.
name: synapse-generate
type: Scheduled Job

# Trigger for your task.
on:
  # The scheduled trigger for your job. You can specify a Unix cron schedule or keyword (@weekly) or a rate (@every 1h30m)
  # AWS Schedule Expressions are also accepted: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
  schedule: "none"
#retries: 3        # Optional. The number of times to retry the job before failing.
#timeout: 1h30m    # Optional. The timeout after which to stop the job if it's still running. You can use the units (h, m, s).

# Configuration for your container and task.
image:
  location: matrixdotorg/synapse:latest
command: generate

cpu: 256       # Number of CPU units for the task.
memory: 512    # Amount of memory in MiB used by the task.

storage:
  volumes:
    efs:
      path: /var/lib/efs/
      read_only: false
      efs:
        id: fs-0b9130403869b3430
        auth:
          iam: true
          access_point_id: fsap-06cd2e16280eb6c27

# Optional fields for more advanced use-cases.
#
variables:                    # Pass environment variables as key value pairs.
  SYNAPSE_SERVER_NAME: sndev.team
  SYNAPSE_REPORT_STATS: no
  SYNAPSE_CONFIG_DIR: /var/lib/efs/matrix
  SYNAPSE_DATA_DIR: /var/lib/efs/matrix
  UID: 991
  GID: 991


#secrets:                      # Pass secrets from AWS Systems Manager (SSM) Parameter Store.
#  GITHUB_TOKEN: GITHUB_TOKEN  # The key is the name of the environment variable, the value is the name of the SSM parameter.

# You can override any of the values defined above by environment.
#environments:
#  prod:
#    cpu: 2048               # Larger CPU value for prod environment.