Skip to content

Commit

Permalink
Merge pull request #629 from Dokploy/canary
Browse files Browse the repository at this point in the history
v0.10.5
  • Loading branch information
Siumauricio authored Oct 31, 2024
2 parents a93f18e + c13249e commit db9136d
Show file tree
Hide file tree
Showing 413 changed files with 5,375 additions and 82,908 deletions.
55 changes: 7 additions & 48 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,6 @@ on:
branches: ["canary", "main"]

jobs:
build-and-push-image-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.docs
push: true
tags: dokploy/docs:latest
platforms: linux/amd64

build-and-push-image-website:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.website
push: true
tags: dokploy/website:latest
platforms: linux/amd64


build-and-push-cloud-image:
runs-on: ubuntu-latest

Expand All @@ -70,8 +25,12 @@ jobs:
file: ./Dockerfile.cloud
push: true
tags: |
siumauricio/cloud:${{ github.ref_name == 'main' && 'main' || 'canary' }}
siumauricio/cloud:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
platforms: linux/amd64
build-args: |
NEXT_PUBLIC_UMAMI_HOST=${{ secrets.NEXT_PUBLIC_UMAMI_HOST }}
NEXT_PUBLIC_UMAMI_WEBSITE_ID=${{ secrets.NEXT_PUBLIC_UMAMI_WEBSITE_ID }}
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }}
build-and-push-schedule-image:
runs-on: ubuntu-latest
Expand All @@ -93,7 +52,7 @@ jobs:
file: ./Dockerfile.schedule
push: true
tags: |
siumauricio/schedule:${{ github.ref_name == 'main' && 'main' || 'canary' }}
siumauricio/schedule:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
platforms: linux/amd64


Expand All @@ -117,5 +76,5 @@ jobs:
file: ./Dockerfile.server
push: true
tags: |
siumauricio/server:${{ github.ref_name == 'main' && 'main' || 'canary' }}
siumauricio/server:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
platforms: linux/amd64
27 changes: 2 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,30 +242,7 @@ export function generate(schema: Schema): Template {
- If you want to show a domain in the UI, please add the prefix \_HOST at the end of the variable name.
- Test first on a vps or a server to make sure the template works.

## Docs
## Docs & Website

To run the docs locally, run the following command:
To contribute to the Dokploy docs or website, please go to this [repository](https://github.com/Dokploy/website).

```bash
pnpm run docs:dev
```

To build the docs, run the following command:

```bash
pnpm run docs:build
```

## Website

To run the website locally, run the following command:

```bash
pnpm run website:dev
```

To build the website, run the following command:

```bash
pnpm run website:build
```
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# Deploy only the dokploy app

ENV NODE_ENV=production
RUN pnpm --filter=@dokploy/server switch:prod
RUN pnpm --filter=@dokploy/server build
RUN pnpm --filter=./apps/dokploy run build

Expand Down
10 changes: 9 additions & 1 deletion Dockerfile.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib
# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/dokploy install --frozen-lockfile


# Deploy only the dokploy app
ARG NEXT_PUBLIC_UMAMI_HOST
ENV NEXT_PUBLIC_UMAMI_HOST=$NEXT_PUBLIC_UMAMI_HOST

ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID=$NEXT_PUBLIC_UMAMI_WEBSITE_ID

ARG NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
ENV NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=$NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY

ENV NODE_ENV=production
RUN pnpm --filter=@dokploy/server switch:prod
RUN pnpm --filter=@dokploy/server build
RUN pnpm --filter=./apps/dokploy run build

Expand Down
35 changes: 0 additions & 35 deletions Dockerfile.docs

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile.schedule
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server
# Deploy only the dokploy app

ENV NODE_ENV=production
RUN pnpm --filter=@dokploy/server switch:prod
RUN pnpm --filter=@dokploy/server build
RUN pnpm --filter=./apps/schedules run build

Expand Down
1 change: 0 additions & 1 deletion Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server
# Deploy only the dokploy app

ENV NODE_ENV=production
RUN pnpm --filter=@dokploy/server switch:prod
RUN pnpm --filter=@dokploy/server build
RUN pnpm --filter=./apps/api run build

Expand Down
35 changes: 0 additions & 35 deletions Dockerfile.website

This file was deleted.

16 changes: 0 additions & 16 deletions apps/api/src/types.ts

This file was deleted.

36 changes: 1 addition & 35 deletions apps/api/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,12 @@
import {
deployApplication,
deployCompose,
deployRemoteApplication,
deployRemoteCompose,
rebuildApplication,
rebuildCompose,
rebuildRemoteApplication,
rebuildRemoteCompose,
updateApplicationStatus,
updateCompose,
} from "@dokploy/server/dist";
} from "@dokploy/server";
import type { DeployJob } from "./schema";
import type { LemonSqueezyLicenseResponse } from "./types";

// const LEMON_SQUEEZY_API_KEY = process.env.LEMON_SQUEEZY_API_KEY;
// const LEMON_SQUEEZY_STORE_ID = process.env.LEMON_SQUEEZY_STORE_ID;
// export const validateLemonSqueezyLicense = async (
// licenseKey: string,
// ): Promise<LemonSqueezyLicenseResponse> => {
// try {
// const response = await fetch(
// "https://api.lemonsqueezy.com/v1/licenses/validate",
// {
// method: "POST",
// headers: {
// "Content-Type": "application/json",
// "x-api-key": LEMON_SQUEEZY_API_KEY as string,
// },
// body: JSON.stringify({
// license_key: licenseKey,
// store_id: LEMON_SQUEEZY_STORE_ID as string,
// }),
// },
// );

// return response.json();
// } catch (error) {
// console.error("Error validating license:", error);
// return { valid: false, error: "Error validating license" };
// }
// };

export const deploy = async (job: DeployJob) => {
try {
Expand Down Expand Up @@ -82,7 +49,6 @@ export const deploy = async (job: DeployJob) => {
}
}
} catch (error) {
console.log(error);
if (job.applicationType === "application") {
await updateApplicationStatus(job.applicationId, "error");
} else if (job.applicationType === "compose") {
Expand Down
7 changes: 6 additions & 1 deletion apps/api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"skipLibCheck": true,
"outDir": "dist",
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
"jsxImportSource": "hono/jsx",
"baseUrl": ".",
"paths": {
"@/*": ["./*"],
"@dokploy/server/*": ["../../packages/server/src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
31 changes: 0 additions & 31 deletions apps/docs/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions apps/docs/.map.ts

This file was deleted.

15 changes: 0 additions & 15 deletions apps/docs/README.md

This file was deleted.

Loading

0 comments on commit db9136d

Please sign in to comment.