> ## Documentation Index
> Fetch the complete documentation index at: https://sitectl.libops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# lifecycle

> Build, start, stop, inspect, and roll out an OJS stack with core sitectl commands.

export const Compose = () => <Tooltip headline="Compose" tip={<>
        Docker Compose is Docker's tool for defining and running multi-container applications.{" "}
        <a href="https://docs.docker.com/compose/">https://docs.docker.com/compose/</a>.
      </>}>
    <>
      <Icon icon="docker" />
      {" "}
      Compose
    </>
  </Tooltip>;

OJS does not define its own lifecycle commands. Like every application plugin, an
OJS stack is built, started, stopped, inspected, and rolled out with the **core**
`sitectl` commands, which operate on whichever context is active:

```bash theme={null}
sitectl create ojs            # scaffold the stack and its context
sitectl compose build         # build images
sitectl compose up -d         # start the stack
sitectl compose ps            # service status
sitectl compose logs -f       # follow logs
sitectl compose down          # stop the stack
sitectl deploy                # pull updates and restart (rollout)
```

The downstream Dockerfile builds from `libops/ojs:3.5.0-5-php84`; that published image already contains the matching OJS release. `sitectl deploy` pulls dependency images and rebuilds the downstream customization layer while the current stack is still online. After stopping it, deploy starts only OJS and its required Compose dependencies, waits up to 5 minutes for the installation marker, and runs the supported `php tools/upgrade.php upgrade` migration. A migration failure fails the deploy; only a successful migration is followed by the full-stack start and bounded 10-minute health wait.

Before changing the OJS base version, back up MariaDB and the user-owned `ojs-files` and `ojs-public` named volumes. Core sitectl can create the database backup:

```bash theme={null}
mkdir -p backups
sitectl mariadb backup ojs --gzip --output backups/ojs-pre-upgrade.sql.gz
```

Archive and test restoration of both OJS named volumes with your Docker-volume backup procedure; a database dump alone does not contain uploaded or public files.

The OJS plugin does not register the generic `dev-mode` component. Mounting a whole OJS plugin category from a mostly empty checkout would hide plugins bundled in the versioned base image. Add custom plugins through the tracked downstream build context, or create an explicit override that mounts only one named custom plugin directory.

`sitectl ojs ...` is reserved for OJS-specific operations, including the PHP
[tools](/plugins/ojs/tools), [PKP tools](/plugins/ojs/pkp-tools), and related
helpers. General <Compose /> lifecycle stays in the core CLI so the same operational
contract applies to every stack.

See [`sitectl create`](/commands/create), [`sitectl compose`](/commands/compose), and
[`sitectl deploy`](/commands/deploy) for the full lifecycle reference.
