Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 16, 2024
0 parents commit 2800703
Show file tree
Hide file tree
Showing 486 changed files with 47,232 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
node_modules
.pnp
.pnp.js
.pnpm

coverage

# next.js
.next/
out/
next-env.d.ts

# nitro
.nitro/
.output/

# expo
.expo/
expo-env.d.ts
apps/expo/.gitignore
apps/expo/ios
apps/expo/android

# production
build

# misc
.DS_Store
*.pem
Thumbs.db

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# typescript
*.tsbuildinfo
dist/

# turbo
.turbo

logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env*

Dockerfile
.dockerignore

*.tsbuildinfo
tsconfig.tsbuildinfo

.github
.vscode
.turbo
.swc

# Exclude deeply nested
**/node_modules
**/.next
**/out/
**/Dockerfile
21 changes: 21 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Since .env is gitignored, you can use .env.example to build a new `.env` file when you clone the repo.
# Keep this file up-to-date when you add new variables to \`.env\`.

# This file will be committed to version control, so make sure not to have any secrets in it.
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.

# The database URL is used to connect to your Supabase database.
POSTGRES_URL="postgres://postgres.[USERNAME]:[PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres?workaround=supabase-pooler.vercel"


# You can generate the secret via 'openssl rand -base64 32' on Unix
# @see https://next-auth.js.org/configuration/options#secret
AUTH_SECRET='supersecret'


AMQP_URL="amqp://ctrlplane:[email protected]:5672"


JOB_AGENT_WORKSPACE="ctrlplane"
JOB_AGENT_NAME="agent"
JOB_AGENT_API_KEY=
21 changes: 21 additions & 0 deletions .github/DISCUSSION_TEMPLATE/ideas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a feature request. Please fill out this form as completely as possible.
- type: textarea
attributes:
label: Describe the feature you'd like to request
description: Please describe the feature as clear and concise as possible. Remember to add context as to why you believe this feature is needed.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like to see
description: Please describe the solution you would like to see. Adding example usage is a good way to provide context.
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: Add any other information related to the feature here. If your feature request is related to any issues or discussions, link them here.
Empty file added .github/FUNDING.yml
Empty file.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 🐞 Bug Report
description: Create a bug report to help us improve
title: "bug: "
labels: ["🐞❔ unconfirmed bug"]
body:
- type: textarea
attributes:
label: Provide environment information
description: |
Run this command in your project root and paste the results in a code block:
```bash
npx envinfo --system --binaries
```
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of the bug, as well as what you expected to happen when encountering it.
validations:
required: true
- type: input
attributes:
label: Link to reproduction
description: Please provide a link to a reproduction of the bug. Issues without a reproduction repo may be ignored.
validations:
required: true
- type: textarea
attributes:
label: To reproduce
description: Describe how to reproduce your bug. Steps, code snippets, reproduction repos etc.
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: Add any other information related to the bug here, screenshots if applicable.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
contact_links:
- name: Ask a question
url: https://github.com/t3-oss/create-t3-turbo/discussions
about: Ask questions and discuss with other community members
- name: Feature request
url: https://github.com/t3-oss/create-t3-turbo/discussions/new?category=ideas
about: Feature requests should be opened as discussions
13 changes: 13 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"packageRules": [
{
"matchPackagePatterns": ["^@ctrlplane/"],
"enabled": false
}
],
"updateInternalDeps": true,
"rangeStrategy": "bump",
"automerge": true
}
102 changes: 102 additions & 0 deletions .github/workflows/apps-dispatchers-kubernetes-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CD / Job Agent / Kubernetes Job

on:
pull_request:
branches: ["*"]
paths:
- job-agent/kubernetes-job/**
- .github/workflows/job-agent-kubernetes-job.yaml
- pnpm-lock.yaml
push:
branches: ["main"]
paths:
- job-agent/kubernetes-job/**
- .github/workflows/job-agent-kubernetes-job.yaml
- pnpm-lock.yaml

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: "google-github-actions/auth@v2"
id: auth
with:
token_format: access_token
project_id: ctrlplane-prod
service_account: [email protected]
workload_identity_provider: "projects/591038869087/locations/global/workloadIdentityPools/github/providers/github"

- name: Login to GCR
uses: docker/login-action@v3
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: "Docker auth"
run: |-
gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: us-central1-docker.pkg.dev/ctrlplane-prod/job-agent/kubernetes-job
tags: |
type=sha,format=short,prefix=
- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
push: false
file: job-agent/kubernetes-job/Dockerfile
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main'
with:
push: true
file: job-agent/kubernetes-job/Dockerfile
tags: ${{ steps.meta.outputs.tags }}

# deploy:
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# needs: build
# permissions:
# contents: read
# id-token: write
# steps:
# - uses: actions/checkout@v4

# - uses: "google-github-actions/auth@v2"
# id: auth
# with:
# token_format: access_token
# project_id: ctrlplane-prod
# service_account: "[email protected]"
# workload_identity_provider: "projects/591038869087/locations/global/workloadIdentityPools/github/providers/github"

# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: us-central1-docker.pkg.dev/ctrlplane-prod/job-agent/kubernetes-job
# tags: |
# type=sha,format=short,prefix=

# - id: "deploy"
# uses: "google-github-actions/deploy-cloudrun@v2"
# with:
# service: "docs"
# image: ${{ steps.meta.outputs.tags }}
104 changes: 104 additions & 0 deletions .github/workflows/apps-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: CD / Docs

on:
pull_request:
branches: ["*"]
paths:
- apps/docs/**
- packages/ui/**
- .github/workflows/apps-docs.yaml
- pnpm-lock.yaml
push:
branches: ["main"]
paths:
- apps/docs/**
- packages/ui/**
- .github/workflows/apps-docs.yaml
- pnpm-lock.yaml

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: "google-github-actions/auth@v2"
id: auth
with:
token_format: access_token
project_id: ctrlplane-prod
service_account: [email protected]
workload_identity_provider: "projects/591038869087/locations/global/workloadIdentityPools/github/providers/github"

- name: Login to GCR
uses: docker/login-action@v3
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: "Docker auth"
run: |-
gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: us-central1-docker.pkg.dev/ctrlplane-prod/apps/docs
tags: |
type=sha,format=short,prefix=
- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
push: false
file: apps/docs/Dockerfile
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main'
with:
push: true
file: apps/docs/Dockerfile
tags: ${{ steps.meta.outputs.tags }}

deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: "google-github-actions/auth@v2"
id: auth
with:
token_format: access_token
project_id: ctrlplane-prod
service_account: "[email protected]"
workload_identity_provider: "projects/591038869087/locations/global/workloadIdentityPools/github/providers/github"

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: us-central1-docker.pkg.dev/ctrlplane-prod/apps/docs
tags: |
type=sha,format=short,prefix=
- id: "deploy"
uses: "google-github-actions/deploy-cloudrun@v2"
with:
service: "docs"
image: ${{ steps.meta.outputs.tags }}
Loading

0 comments on commit 2800703

Please sign in to comment.