Manages the services hosted on the Flow Platform.
Find a file
Dan Anglin ee910722cb
feat: add backup support for Code Flow
Add support for taking on demand backups of Code Flow.
Resolves flow/services#7
2023-12-17 08:51:11 +00:00
assets/gotosocial fix(gts): add custom fonts to GTS 2023-08-15 13:37:57 +01:00
config@1766c5ec17 feat: add backup support for Code Flow 2023-12-17 08:51:11 +00:00
example/gotosocial/css fix(gts/css): update word-wrap for fields 2023-08-23 00:39:06 +01:00
internal feat: add backup support for Code Flow 2023-12-17 08:51:11 +00:00
magefiles feat: add backup support for Code Flow 2023-12-17 08:51:11 +00:00
templates feat: add backup support for Code Flow 2023-12-17 08:51:11 +00:00
.gitattributes chore: add fonts to LFS 2023-08-15 13:29:43 +01:00
.gitignore chore: upgrade Forgejo to v1.21.2-1 2023-12-16 12:09:26 +00:00
.gitmodules chore: add config submodule and update render script 2022-11-21 17:31:28 +00:00
go.mod refactor: update project structure 2023-11-24 09:56:35 +00:00
go.sum fix(traefik): update the root domain redirect rule 2023-08-01 16:40:45 +01:00
LICENSE chore: add LICENSE 2023-02-12 21:11:04 +00:00
README.asciidoc feat: add backup support for Code Flow 2023-12-17 08:51:11 +00:00

Flow Services

Overview

The repository manages the services hosted on Flow Platform with the use of Go and Mage.

Currently hosted services

Name Description Link

Landing

The front page of the Flow Platform.

https://dananglin.me.uk

Free Flow

A single-user ActivityPub instance powered by GoToSocial.

https://freeflow.dananglin.me.uk

Code Flow

The Flow Platforms software forge powered by Forgejo.

https://codeflow.dananglin.me.uk

Work Flow

A simple CI engine powered by Woodpecker.

https://workflow.dananglin.me.uk

Mage targets

$ mage -l
Targets:
  backup      creates a backup of the specified service.
  clean       cleans the workspace.
  deploy      deploys the service(s) to the Flow Platform.
  prepare     prepares the service's build directory.
  shutdown    shuts down the Flow Platform in a given environment.
  stop        stops a running service within the Flow Platform.

Deployment guide

The config directory contains the Flow Platforms configuration (e.g. versions of hosted software, etc). It is a submodule of a hidden repository due to the sensitive nature of the configuration.

  1. (Optional) Run mage prepare <environment> <service> to run preparations before deployment. Here the relevant files to run the service are downloaded, templates are rendered and static assets are copied to the build directory (if required). Step is optional because the 'deploy' stage automatically runs 'prepare' as a dependency. For example:

    mage prepare production forgejo
  2. To deploy changes to Platform, run mage deploy <environment> <service>. The deploy target runs the prepare target as a dependency. For example:

    mage deploy production forgejo

Backup Guide

There is support for backing up the data for some of the services, e.g. forgejo. You can use mage to run the backup for a specific service.

mage backup production forgejo

Here mage will stop the running service and recreate the container running the specific backup script for that service. If there is no backup support for a particular service mage will inform you of this.

$ mage backup production traefik
Backup is not supported for "traefik".

Currently the service will not automatically resume after the backup is completed but you can achieve this with a chain command.

mage backup production forgejo && mage deploy production forgejo