Skip to content

Commit eaf2f32

Browse files
line endings
1 parent be79eb3 commit eaf2f32

23 files changed

+13047
-13047
lines changed

.dockerignore

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
node_modules
2-
npm-debug.log
3-
Dockerfile
4-
.dockerignore
5-
.env
6-
.env*
7-
yarn-error.log
8-
.husky
9-
docker-compose*.yml
10-
Dockerfile*
11-
.DS_Store
12-
swagger.yml
13-
test
14-
.dist
15-
.github
16-
.gitignore
17-
.git
18-
.coverage
19-
dist
20-
docs
21-
.vscode
1+
node_modules
2+
npm-debug.log
3+
Dockerfile
4+
.dockerignore
5+
.env
6+
.env*
7+
yarn-error.log
8+
.husky
9+
docker-compose*.yml
10+
Dockerfile*
11+
.DS_Store
12+
swagger.yml
13+
test
14+
.dist
15+
.github
16+
.gitignore
17+
.git
18+
.coverage
19+
dist
20+
docs
21+
.vscode

.env.example

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# =====[ Required Configuration ]=====
2-
3-
# Get your api secret key from the thirdweb dashboard - https://thirdweb.com/dashboard
4-
THIRDWEB_API_SECRET_KEY="<your-thirdweb-api-secret-key>"
5-
# The connection url for your running postgres instance, defaults to localhost postgres
6-
POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
7-
# The admin wallet that will be able to connect to Engine from the dashboard
8-
ADMIN_WALLET_ADDRESS="<your-admin-wallet-address>"
9-
# Encryption password for the wallet keys
10-
ENCRYPTION_PASSWORD="<your-encryption-password>"
11-
# The connection url for your running redis instance, defaults to localhost redis
12-
REDIS_URL="redis://localhost:6379/0"
13-
14-
# =====[ Optional Configuration ]=====
15-
16-
# Optional configuration to override server host and port
17-
# PORT="3005"
18-
# HOST="0.0.0.0"
19-
20-
# Optional configuration to enable https usage for localhost
21-
# ENABLE_HTTPS="false"
22-
# HTTPS_PASSPHRASE="..."
1+
# =====[ Required Configuration ]=====
2+
3+
# Get your api secret key from the thirdweb dashboard - https://thirdweb.com/dashboard
4+
THIRDWEB_API_SECRET_KEY="<your-thirdweb-api-secret-key>"
5+
# The connection url for your running postgres instance, defaults to localhost postgres
6+
POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
7+
# The admin wallet that will be able to connect to Engine from the dashboard
8+
ADMIN_WALLET_ADDRESS="<your-admin-wallet-address>"
9+
# Encryption password for the wallet keys
10+
ENCRYPTION_PASSWORD="<your-encryption-password>"
11+
# The connection url for your running redis instance, defaults to localhost redis
12+
REDIS_URL="redis://localhost:6379/0"
13+
14+
# =====[ Optional Configuration ]=====
15+
16+
# Optional configuration to override server host and port
17+
# PORT="3005"
18+
# HOST="0.0.0.0"
19+
20+
# Optional configuration to enable https usage for localhost
21+
# ENABLE_HTTPS="false"
22+
# HTTPS_PASSPHRASE="..."

.env.test

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
THIRDWEB_API_SECRET_KEY="test"
2-
POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
3-
ADMIN_WALLET_ADDRESS="test"
4-
ENCRYPTION_PASSWORD="test"
5-
ENABLE_KEYPAIR_AUTH="true"
6-
ENABLE_HTTPS="true"
7-
REDIS_URL="redis://127.0.0.1:6379/0"
8-
THIRDWEB_API_SECRET_KEY="my-thirdweb-secret-key"
9-
10-
TEST_AWS_KMS_KEY_ID=""
11-
TEST_AWS_KMS_ACCESS_KEY_ID=""
12-
TEST_AWS_KMS_SECRET_ACCESS_KEY=""
13-
TEST_AWS_KMS_REGION=""
14-
15-
TEST_GCP_KMS_RESOURCE_PATH=""
16-
TEST_GCP_KMS_EMAIL=""
1+
THIRDWEB_API_SECRET_KEY="test"
2+
POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
3+
ADMIN_WALLET_ADDRESS="test"
4+
ENCRYPTION_PASSWORD="test"
5+
ENABLE_KEYPAIR_AUTH="true"
6+
ENABLE_HTTPS="true"
7+
REDIS_URL="redis://127.0.0.1:6379/0"
8+
THIRDWEB_API_SECRET_KEY="my-thirdweb-secret-key"
9+
10+
TEST_AWS_KMS_KEY_ID=""
11+
TEST_AWS_KMS_ACCESS_KEY_ID=""
12+
TEST_AWS_KMS_SECRET_ACCESS_KEY=""
13+
TEST_AWS_KMS_REGION=""
14+
15+
TEST_GCP_KMS_RESOURCE_PATH=""
16+
TEST_GCP_KMS_EMAIL=""
1717
TEST_GCP_KMS_PK=""

.github/pull_request_template.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
## Changes
2-
3-
- Linear: https://linear.app/thirdweb/issue/INF-171/
4-
- Here is the problem being solved.
5-
- Here are the changes made.
6-
7-
## How this PR will be tested
8-
9-
- [ ] Open the dashboard and click X. Result: A modal should appear.
10-
- [ ] Call the /foo/bar API. Result: Returns 200 with "baz" in the response body.
11-
12-
## Output
13-
14-
(Example: Screenshot/GIF for UI changes, cURL output for API changes)
1+
## Changes
2+
3+
- Linear: https://linear.app/thirdweb/issue/INF-171/
4+
- Here is the problem being solved.
5+
- Here are the changes made.
6+
7+
## How this PR will be tested
8+
9+
- [ ] Open the dashboard and click X. Result: A modal should appear.
10+
- [ ] Call the /foo/bar API. Result: Returns 200 with "baz" in the response body.
11+
12+
## Output
13+
14+
(Example: Screenshot/GIF for UI changes, cURL output for API changes)

.github/workflows/build-image-tag.yml

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,89 @@
1-
name: Tag Based Image Build
2-
3-
on:
4-
release:
5-
types: [created] # This listens to release creation events
6-
7-
env:
8-
REGISTRY_IMAGE: thirdweb/engine
9-
10-
jobs:
11-
build:
12-
runs-on: ${{ matrix.runner }}
13-
strategy:
14-
matrix:
15-
include:
16-
- platform: linux/amd64
17-
runner: ubuntu-latest
18-
arch: amd64
19-
- platform: linux/arm64
20-
runner: ubuntu-24.04-arm64
21-
arch: arm64
22-
env:
23-
LATEST_TAG: ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
24-
25-
steps:
26-
- name: Checkout code
27-
uses: actions/checkout@v3
28-
with:
29-
ref: ${{ github.event.release.target_commitish }}
30-
31-
- name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v3
33-
34-
- name: Login to DockerHub
35-
uses: docker/login-action@v3
36-
with:
37-
username: ${{ secrets.DOCKER_USERNAME }}
38-
password: ${{ secrets.DOCKER_PASSWORD }}
39-
40-
- name: Build and Push Docker Image
41-
uses: docker/build-push-action@v6
42-
with:
43-
context: .
44-
target: prod
45-
platforms: ${{ matrix.platform }}
46-
push: true
47-
tags: |
48-
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-${{ matrix.arch }}
49-
${{ env.LATEST_TAG != '' && format('thirdweb/engine:latest-{0}', matrix.arch) || '' }}
50-
cache-from: type=gha,scope=${{ matrix.platform }}
51-
cache-to: type=gha,scope=${{ matrix.platform }},mode=max
52-
build-args: ENGINE_VERSION=${{ github.event.release.tag_name }}
53-
54-
merge-manifests:
55-
needs: build
56-
runs-on: ubuntu-latest
57-
env:
58-
LATEST_TAG: ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
59-
steps:
60-
- name: Set up Docker Buildx
61-
uses: docker/setup-buildx-action@v3
62-
63-
- name: Login to DockerHub
64-
uses: docker/login-action@v3
65-
with:
66-
username: ${{ secrets.DOCKER_USERNAME }}
67-
password: ${{ secrets.DOCKER_PASSWORD }}
68-
69-
- name: Create and Push Multi-arch Manifest (release tag)
70-
run: |
71-
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }} \
72-
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-amd64 \
73-
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-arm64
74-
75-
- name: Inspect release image
76-
run: |
77-
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}
78-
79-
- name: Create and Push Multi-arch Manifest (latest tag) (if applicable)
80-
if: ${{ env.LATEST_TAG != '' }}
81-
run: |
82-
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:latest \
83-
${{ env.REGISTRY_IMAGE }}:latest-amd64 \
84-
${{ env.REGISTRY_IMAGE }}:latest-arm64
85-
86-
- name: Inspect latest image (if applicable)
87-
if: ${{ env.LATEST_TAG != '' }}
88-
run: |
1+
name: Tag Based Image Build
2+
3+
on:
4+
release:
5+
types: [created] # This listens to release creation events
6+
7+
env:
8+
REGISTRY_IMAGE: thirdweb/engine
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.runner }}
13+
strategy:
14+
matrix:
15+
include:
16+
- platform: linux/amd64
17+
runner: ubuntu-latest
18+
arch: amd64
19+
- platform: linux/arm64
20+
runner: ubuntu-24.04-arm64
21+
arch: arm64
22+
env:
23+
LATEST_TAG: ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
with:
29+
ref: ${{ github.event.release.target_commitish }}
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Login to DockerHub
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ secrets.DOCKER_USERNAME }}
38+
password: ${{ secrets.DOCKER_PASSWORD }}
39+
40+
- name: Build and Push Docker Image
41+
uses: docker/build-push-action@v6
42+
with:
43+
context: .
44+
target: prod
45+
platforms: ${{ matrix.platform }}
46+
push: true
47+
tags: |
48+
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-${{ matrix.arch }}
49+
${{ env.LATEST_TAG != '' && format('thirdweb/engine:latest-{0}', matrix.arch) || '' }}
50+
cache-from: type=gha,scope=${{ matrix.platform }}
51+
cache-to: type=gha,scope=${{ matrix.platform }},mode=max
52+
build-args: ENGINE_VERSION=${{ github.event.release.tag_name }}
53+
54+
merge-manifests:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
env:
58+
LATEST_TAG: ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
59+
steps:
60+
- name: Set up Docker Buildx
61+
uses: docker/setup-buildx-action@v3
62+
63+
- name: Login to DockerHub
64+
uses: docker/login-action@v3
65+
with:
66+
username: ${{ secrets.DOCKER_USERNAME }}
67+
password: ${{ secrets.DOCKER_PASSWORD }}
68+
69+
- name: Create and Push Multi-arch Manifest (release tag)
70+
run: |
71+
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }} \
72+
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-amd64 \
73+
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-arm64
74+
75+
- name: Inspect release image
76+
run: |
77+
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}
78+
79+
- name: Create and Push Multi-arch Manifest (latest tag) (if applicable)
80+
if: ${{ env.LATEST_TAG != '' }}
81+
run: |
82+
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:latest \
83+
${{ env.REGISTRY_IMAGE }}:latest-amd64 \
84+
${{ env.REGISTRY_IMAGE }}:latest-arm64
85+
86+
- name: Inspect latest image (if applicable)
87+
if: ${{ env.LATEST_TAG != '' }}
88+
run: |
8989
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest

.github/workflows/build.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
name: Build
2-
3-
on: pull_request
4-
5-
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout code
10-
uses: actions/checkout@v3
11-
with:
12-
ref: ${{ github.ref }}
13-
14-
- name: Set up Node.js
15-
uses: actions/setup-node@v3
16-
with:
17-
node-version: "18"
18-
cache: "yarn"
19-
20-
- name: Install dependencies
21-
run: yarn install
22-
23-
- name: Run build
24-
run: yarn build
1+
name: Build
2+
3+
on: pull_request
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.ref }}
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: "18"
18+
cache: "yarn"
19+
20+
- name: Install dependencies
21+
run: yarn install
22+
23+
- name: Run build
24+
run: yarn build

0 commit comments

Comments
 (0)