0

I want to Railway run regular updates. I asked Chat GPT ways to accomplish it, it suggested creating railway.yml with the following content:

version: '1.0'
services:
  someName:
    build:
      dockerfile: Dockerfile
    env:
      PORT: $${PORT}
      MONGO_URL: $${MONGO_URL}
    ports:
      - $${PORT}:$${PORT}
    restart: always
  update:
    schedule:
      - name: update
        command: node update.js
        interval: 600

Though I noticed railway status didn't actually factor in the schedule defined in the yml-file, apparently, it ignores it completely. Then I noticed that Chat GPT is using outdated information and the use railway.yml seems to have been scrapped from modern documentation... What is the modern way of deploying updates?

My goal is to make Railway check certain things every 10 minutes and make changes accordingly. The changes will be made when node update.js is run, the problem is that I don't know how to run the schedule... I have tried creating .railway folder and putting railway.yaml there with no success. My repo is hosted in GitHub.

Chlodio
  • 205
  • 1
  • 3
  • 10
  • That looks like a Docker Compose YAML file, though a little odd one. In particular Compose file version 1 did not actually include a `version:` line, and the environment-variable references have incorrect double dollar signs. Rather than paste incorrect output that an automated tool generated, can you [edit] the question to describe what you personally have tried to set up, what's gone wrong, and make it clearer what your end goal is? – David Maze Mar 20 '23 at 10:28
  • Added some, hopefully, it helps. – Chlodio Mar 20 '23 at 14:58

0 Answers0