-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(editor): deploy editor workflow setup (#1148)
- Loading branch information
Showing
5 changed files
with
88 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: 🚀 Deploy Editor | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
DOCKER_IMAGE: shortvid-editor:latest | ||
|
||
jobs: | ||
build: | ||
name: 🐋 Build docker image and push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: Login to Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.SCW_REGISTRY_ENDPOINT }} | ||
username: nologin | ||
password: ${{ secrets.SCW_SECRET_KEY }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: ${{ secrets.SCW_REGISTRY_ENDPOINT }}/${{ env.DOCKER_IMAGE }} | ||
file: ./Dockerfile.editor | ||
deploy: | ||
needs: | ||
- build | ||
name: Deploy serverless container | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Scaleway Container Deploy action | ||
uses: philibea/[email protected] | ||
with: | ||
type: deploy | ||
scw_access_key: ${{ secrets.SCW_ACCESS_KEY }} | ||
scw_secret_key: ${{ secrets.SCW_SECRET_KEY }} | ||
scw_containers_namespace_id: ${{ secrets.CONTAINERS_NAMESPACE_ID }} | ||
scw_registry: ${{ secrets.SCW_REGISTRY_ENDPOINT }}/${{ env.DOCKER_IMAGE }} | ||
scw_memory_limit: 6144 | ||
scw_cpu_limit: 4000 | ||
scw_min_scale: 0 | ||
scw_max_scale: 1 | ||
scw_container_port: 3000 | ||
scw_max_concurrency: 80 | ||
scw_sandbox: v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
FROM node:20-bookworm | ||
RUN apt-get update | ||
RUN apt install -y \ | ||
libnss3 \ | ||
libdbus-1-3 \ | ||
libatk1.0-0 \ | ||
libgbm-dev \ | ||
libasound2 \ | ||
libxrandr2 \ | ||
libxkbcommon-dev \ | ||
libxfixes3 \ | ||
libxcomposite1 \ | ||
libxdamage1 \ | ||
libatk-bridge2.0-0 \ | ||
libcups2 | ||
RUN corepack enable | ||
# Copy everything from your project to the Docker image. Adjust if needed. | ||
COPY --link package.json package*.json yarn.lock* pnpm-lock.yaml* bun.lockb* tsconfig.json* remotion.config.* .prettierrc* ./ | ||
COPY --link remotion ./remotion | ||
# If you have a public folder: | ||
COPY --link public ./public | ||
COPY --link src ./src | ||
# Install the right package manager and dependencies. Adjust if needed. | ||
RUN git init | ||
# Install Chrome | ||
RUN pnpm install | ||
RUN pnpm browser | ||
CMD ["pnpm", "run:studio"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters