Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/codehike/annotations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export {
tokenTransitions,
SmoothPre,
} from "@/components/codehike/annotations/token-transitions";
export { wordWrap } from "@/components/codehike/annotations/word-wrap";
export { link } from "@/components/codehike/annotations/link";
export { mark } from "@/components/codehike/annotations/mark";
export { foldinline } from "@/components/codehike/annotations/fold-inline";
Expand Down
41 changes: 0 additions & 41 deletions src/components/codehike/annotations/word-wrap.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/codehike/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import dynamic from "next/dynamic";
import { Pre, type CustomPreProps } from "codehike/code";
import {
callout,
wordWrap,
className,
tabs,
mark,
Expand All @@ -42,7 +41,6 @@ export const CodeHikeSSR = ({
codeblock,
handlers = [
callout,
wordWrap,
className,
tabs,
mark,
Expand Down
1 change: 0 additions & 1 deletion src/components/codehike/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export {
MAX_TRANSITION_DURATION,
} from "@/components/codehike/constants";
export {
wordWrap,
tokenTransitions,
SmoothPre,
callout,
Expand Down
2 changes: 0 additions & 2 deletions src/components/codehike/scrollycoding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { Block, HighlightedCodeBlock, parseProps } from "codehike/blocks";
import { HighlightedCode, Pre } from "codehike/code";
import {
callout,
wordWrap,
className,
tabs,
mark,
Expand Down Expand Up @@ -79,7 +78,6 @@ function Code({ codeblock }: { codeblock: HighlightedCode }) {
code={codeblock}
handlers={[
callout,
wordWrap,
className,
tabs,
mark,
Expand Down
2 changes: 0 additions & 2 deletions src/components/codehike/slideshow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import React, { useState, useEffect } from "react";
import { Pre, HighlightedCode, highlight, RawCode } from "codehike/code";
import {
callout,
wordWrap,
className,
tabs,
mark,
Expand Down Expand Up @@ -92,7 +91,6 @@ function Code({ codeblock }: { codeblock: RawCode | HighlightedCode }) {
code={highlightedCode}
handlers={[
callout,
wordWrap,
className,
tabs,
mark,
Expand Down
2 changes: 0 additions & 2 deletions src/components/codehike/spotlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
} from "codehike/utils/selection";
import {
callout,
wordWrap,
className,
tabs,
mark,
Expand Down Expand Up @@ -114,7 +113,6 @@ function Code({ codeblock }: { codeblock: RawCode | HighlightedCode }) {
code={highlightedCode}
handlers={[
callout,
wordWrap,
className,
tabs,
mark,
Expand Down
4 changes: 2 additions & 2 deletions src/components/codehike/token-transition-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import { useState, useEffect } from "react";
import { Pre, highlight, HighlightedCode } from "codehike/code";
import { tokenTransitions, wordWrap } from "@/components/codehike/annotations";
import { tokenTransitions } from "@/components/codehike/annotations";
import dynamic from "next/dynamic";
import Loader from "@/components/loader";
import {
Expand Down Expand Up @@ -56,7 +56,7 @@ function TokenTransitionToggleClient({
<div className="relative">
<Pre
code={currentCode}
handlers={[tokenTransitions, wordWrap]}
handlers={[tokenTransitions]}
className="p-4 rounded-none"
style={{ position: "relative" }}
/>
Expand Down
1 change: 0 additions & 1 deletion src/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export {
Scrollycoding,
THEMES,
MAX_TRANSITION_DURATION,
wordWrap,
tokenTransitions,
SmoothPre,
callout,
Expand Down
3 changes: 3 additions & 0 deletions src/pages/docs/_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export default {
"getting-started": {
"title": "Getting Started"
},
"schema": {
"title": "Schema Reference"
},
"--": {
"type": "separator"
},
Expand Down
48 changes: 48 additions & 0 deletions src/pages/docs/schema/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Copyright 2026 GoodRx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export default {
"overview": {
"title": "Schema Overview"
},
"environment": {
"title": "Environment Configuration"
},
"webhooks": {
"title": "Webhooks Configuration"
},
"---": {
"type": "separator"
},
"github": {
"title": "GitHub Service"
},
"docker": {
"title": "Docker Service"
},
"helm": {
"title": "Helm Service"
},
"codefresh": {
"title": "Codefresh Service"
},
"aurora-restore": {
"title": "Aurora Restore Service"
},
"configuration": {
"title": "Configuration Service"
}
};
98 changes: 98 additions & 0 deletions src/pages/docs/schema/aurora-restore.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: Aurora Restore Service
description: Restore AWS Aurora database snapshots for ephemeral environments
tags:
- schema
- aurora
- database
- aws
- restore
---

import { Callout } from "nextra/components";

The `auroraRestore` service type restores AWS Aurora database snapshots for use in ephemeral environments. This allows you to test against production-like data.

<Callout type="warning">
This documentation is still in progress and will be updated shortly with the
latest information.
</Callout>

## Required Fields

| Field | Type | Description |
| ----------- | ------ | -------------------------------------------- |
| `command` | string | Command to execute for the restore operation |
| `arguments` | string | Arguments passed to the command |

```yaml filename="lifecycle.yaml"
services:
- name: "database-restore"
auroraRestore:
command: "/restore/run.sh" # Required
arguments: "--snapshot-id latest" # Required
```

## How It Works

1. When the environment is deployed, Lifecycle executes the configured command with arguments
2. The command typically triggers an Aurora snapshot restore process
3. Once complete, the restored database is available for other services

<Callout type="info">
The `auroraRestore` service type is a specialized service that runs a command
to initiate database restoration. The actual restore logic is implemented in
your command/script.
</Callout>

## Example

```yaml filename="lifecycle.yaml"
environment:
defaultServices:
- name: "api"
- name: "aurora-db"

services:
- name: "api"
github:
repository: "myorg/api"
branchName: "main"
docker:
defaultTag: "main"
app:
dockerfilePath: "Dockerfile"
env:
DATABASE_URL: "{{aurora-db_internalHostname}}:5432"
ports:
- 3000

- name: "aurora-db"
auroraRestore:
command: "/scripts/restore-aurora.sh"
arguments: "--cluster my-cluster --snapshot production-backup"
```

## Use Cases

- **Production data testing** - Test features against realistic production data
- **Database migrations** - Validate migrations against production schema
- **Performance testing** - Benchmark against production-scale data
- **Bug reproduction** - Reproduce issues with production data state

<Callout type="warning">
When restoring from production snapshots, ensure sensitive data is properly
anonymized or that access is appropriately restricted.
</Callout>

## Implementation Notes

The restore command is executed as part of the environment deployment process. Your script should:

1. Handle authentication with AWS
2. Initiate the snapshot restore
3. Wait for the restore to complete
4. Configure network access to the restored instance
5. Return the connection information

The restored database endpoint can then be referenced by other services using template variables.
Loading