Prax Deploy

scripts

Simply write a config file (projects.yaml):

- name: myProject1
  repo: git@github.com:Prabesh01/statamic-cool-writing-customized.git
  server: server1
  domains:
    - 8000:prax.to:9001

With just that, your docker project in github will be deploy to your vps with ports and domain setup in a jiffy.

Domains field breakdown:

8000:prax.to:9001
│    │       └── host port (what VPS exposes)
│    └────────── domain (optional, use - for none)
└─────────────── container port (what app listens on)

Servers can be configured in servers.yaml:

- name: server1
  ip: 4.8.54.183
  user: ubuntu
  key: server1.key

Backing up and Restoring files and databases cannot be anymore easier (projects-data.yaml):

- project: statamic
  files:
    - .env
    - content
    - users
    - public/assets
    - storage/statamic/users
  database:
    - cms-mysql://deploy:stgpass@localhost:3306/tmstage
  datastore: r2

You can set s3 and sftp data stores where you want to backup and restore the project's data (data-stores.yaml):

- name: r2
  type: s3
  bucket: my-backups
  endpoint: https://123.r2.cloudflarestorage.com
  key_id: 123
  key_secret: xxx

Super easy to use:

usage: ./prax.sh list (Lists projects)
       /prax.sh deploy myProject1
       ./prax.sh backup myProject1
       ./prax.sh restore myProject1