Skip to content

Commit

Permalink
Merge pull request #580 from Dokploy/canary
Browse files Browse the repository at this point in the history
v0.10.2
  • Loading branch information
Siumauricio authored Oct 23, 2024
2 parents df9fad0 + 8faa6ae commit 01e5cf0
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 34 deletions.
8 changes: 4 additions & 4 deletions LICENSE.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ See the License for the specific language governing permissions and limitations

## Additional Terms for Specific Features

The following additional terms apply to the multi-node support and Docker Compose file support features of Dokploy. In the event of a conflict, these provisions shall take precedence over those in the Apache License:
The following additional terms apply to the multi-node support, Docker Compose file and Multi Server features of Dokploy. In the event of a conflict, these provisions shall take precedence over those in the Apache License:

- **Self-Hosted Version Free**: All features of Dokploy, including multi-node support and Docker Compose file support, will always be free to use in the self-hosted version.
- **Restriction on Resale**: The multi-node support and Docker Compose file support features cannot be sold or offered as a service by any party other than the copyright holder without prior written consent.
- **Modification Distribution**: Any modifications to the multi-node support and Docker Compose file support features must be distributed freely and cannot be sold or offered as a service.
- **Self-Hosted Version Free**: All features of Dokploy, including multi-node support, Docker Compose file support and Multi Server, will always be free to use in the self-hosted version.
- **Restriction on Resale**: The multi-node support, Docker Compose file support and Multi Server features cannot be sold or offered as a service by any party other than the copyright holder without prior written consent.
- **Modification Distribution**: Any modifications to the multi-node support, Docker Compose file support and Multi Server features must be distributed freely and cannot be sold or offered as a service.

For further inquiries or permissions, please contact us directly.
4 changes: 2 additions & 2 deletions apps/dokploy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dokploy",
"version": "v0.10.1",
"version": "v0.10.2",
"private": true,
"license": "Apache-2.0",
"type": "module",
Expand All @@ -10,7 +10,7 @@
"build-server": "tsx esbuild.config.ts",
"build-next": "next build",
"setup": "tsx -r dotenv/config setup.ts && sleep 5 && pnpm run migration:run",
"reset-password": "node dist/reset-password.mjs",
"reset-password": "node -r dotenv/config dist/reset-password.mjs",
"dev": "tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ",
"studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts",
"migration:generate": "drizzle-kit generate --config ./server/db/drizzle.config.ts",
Expand Down
41 changes: 30 additions & 11 deletions apps/dokploy/templates/directus/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,66 @@
version: "3.8"
services:
database:
image: postgis/postgis:13-master
volumes:
- directus:/var/lib/postgresql/data
- directus_database:/var/lib/postgresql/data
networks:
- dokploy-network
environment:
POSTGRES_USER: "directus"
POSTGRES_PASSWORD: "directus"
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: "directus"
healthcheck:
test: ["CMD", "pg_isready", "--host=localhost", "--username=directus"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s

cache:
image: redis:6
healthcheck:
test: ["CMD-SHELL", "[ $$(redis-cli ping) = 'PONG' ]"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s
networks:
- dokploy-network

directus:
image: directus/directus:10.12.1
image: directus/directus:11.0.2
ports:
- 8055
volumes:
- ../files/uploads:/directus/uploads
- ../files/extensions:/directus/extensions
- directus_uploads:/directus/uploads
- directus_extensions:/directus/extensions
depends_on:
- cache
- database
database:
condition: service_healthy
cache:
condition: service_healthy
environment:
SECRET: "replace-with-secure-random-value"
SECRET: ${DIRECTUS_SECRET}

DB_CLIENT: "pg"
DB_HOST: "database"
DB_PORT: "5432"
DB_DATABASE: "directus"
DB_USER: "directus"
DB_PASSWORD: "directus"
DB_PASSWORD: ${DATABASE_PASSWORD}

CACHE_ENABLED: "true"
CACHE_AUTO_PURGE: "true"
CACHE_STORE: "redis"
REDIS: "redis://cache:6379"

# After first successful login, remove the admin email/password env. variables below
# as these will now be stored in the database.
ADMIN_EMAIL: "[email protected]"
ADMIN_PASSWORD: "d1r3ctu5"
volumes:
directus:
directus_uploads:
directus_extensions:
directus_database:
11 changes: 11 additions & 0 deletions apps/dokploy/templates/directus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ import {
type DomainSchema,
type Schema,
type Template,
generateBase64,
generatePassword,
generateRandomDomain,
} from "../utils";

export function generate(schema: Schema): Template {
const directusSecret = generateBase64(64);
const databasePassword = generatePassword();

const domains: DomainSchema[] = [
{
host: generateRandomDomain(schema),
Expand All @@ -14,7 +19,13 @@ export function generate(schema: Schema): Template {
},
];

const envs = [
`DATABASE_PASSWORD=${databasePassword}`,
`DIRECTUS_SECRET=${directusSecret}`,
];

return {
domains,
envs,
};
}
2 changes: 1 addition & 1 deletion apps/dokploy/templates/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const templates: TemplateData[] = [
{
id: "directus",
name: "Directus",
version: "10.12.1",
version: "11.0.2",
description:
"Directus is an open source headless CMS that provides an API-first solution for building custom backends.",
logo: "directus.jpg",
Expand Down
18 changes: 9 additions & 9 deletions apps/website/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@
},
"faq": {
"title": "Frequently asked questions",
"des": "If you cant find what youre looking for, please submit an issue through our GitHub repository or ask questions on our Discord.",
"des": "If you can't find what you're looking for, please submit an issue through our GitHub repository or ask questions on our Discord.",
"q1": "What is dokploy?",
"a1": "Dokploy is a stable, easy-to-use deployment solution designed to simplify the application management process. Think of Dokploy as a free alternative self-hostable solution to platforms like Heroku, Vercel, and Netlify.",
"q2": "Why Choose Dokploy?",
"a2": "Simplicity, Flexibility, and Fast",
"q3": "Is free?",
"a3": "Yes, dokploy is totally free. You can use it for personal projects, small teams, or even for large-scale applications.",
"a2": "Dokploy offers simplicity, flexibility, and speed in application deployment and management.",
"q3": "Is Dokploy free?",
"a3": "Yes, Dokploy is totally free. You can use it for personal projects, small teams, or even for large-scale applications.",
"q4": "Is it open source?",
"a4": "Yes, dokploy is open source and free to use.",
"q5": "What types of languages can i deploy with dokploy?",
"a5": "Dokploy do not restrict programming languages. you are free to choose your preferred language and framework.",
"a4": "Yes, Dokploy is open source and free to use.",
"q5": "What types of languages can I deploy with Dokploy?",
"a5": "Dokploy does not restrict programming languages. You are free to choose your preferred language and framework.",
"q6": "How do I request a feature or report a bug?",
"a6": "Currently we are working on fixing bug fixes, but we will be releasing new features soon. You can also request features or report bugs.",
"a6": "To request a feature or report a bug, please create an issue on our GitHub repository or ask in our Discord channel. We are currently focused on addressing existing bugs and plan to release new features soon.",
"q7": "Do you track the usage of Dokploy?",
"a7": "No, we don't track any usage data.",
"q8": "Are there any user forums or communities where I can interact with other users?",
"a8": "Yes, we have active github discussions where you can share ideas, ask for help, and connect with other users.",
"a8": "Yes, we have active GitHub discussions where you can share ideas, ask for help, and connect with other users.",
"q9": "What types of applications can I deploy with Dokploy?",
"a9": "Dokploy supports a variety of applications, including those built with Docker, as well as applications from any Git repository, offering custom builds with Nixpacks, Dockerfiles, or Buildpacks like Heroku and Paketo.",
"q10": "How does Dokploy handle database management?",
Expand Down
5 changes: 5 additions & 0 deletions apps/website/public/canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ install_dokploy() {

docker swarm init --advertise-addr $advertise_addr

if [ $? -ne 0 ]; then
echo "Error: Failed to initialize Docker Swarm" >&2
exit 1
fi

echo "Swarm initialized"

docker network rm -f dokploy-network 2>/dev/null
Expand Down
5 changes: 5 additions & 0 deletions apps/website/public/feature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ install_dokploy() {

docker swarm init --advertise-addr $advertise_addr

if [ $? -ne 0 ]; then
echo "Error: Failed to initialize Docker Swarm" >&2
exit 1
fi

echo "Swarm initialized"

docker network rm -f dokploy-network 2>/dev/null
Expand Down
5 changes: 5 additions & 0 deletions apps/website/public/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ install_dokploy() {
advertise_addr=$(get_ip)

docker swarm init --advertise-addr $advertise_addr

if [ $? -ne 0 ]; then
echo "Error: Failed to initialize Docker Swarm" >&2
exit 1
fi

echo "Swarm initialized"

Expand Down
6 changes: 4 additions & 2 deletions packages/server/src/utils/providers/bitbucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const cloneBitbucketRepository = async (
bitbucketBranch!,
"--depth",
"1",
"--recurse-submodules",
cloneUrl,
outputPath,
"--progress",
Expand Down Expand Up @@ -111,6 +112,7 @@ export const cloneRawBitbucketRepository = async (entity: Compose) => {
bitbucketBranch!,
"--depth",
"1",
"--recurse-submodules",
cloneUrl,
outputPath,
"--progress",
Expand Down Expand Up @@ -153,7 +155,7 @@ export const cloneRawBitbucketRepositoryRemote = async (compose: Compose) => {
try {
const command = `
rm -rf ${outputPath};
git clone --branch ${bitbucketBranch} --depth 1 ${cloneUrl} ${outputPath}
git clone --branch ${bitbucketBranch} --depth 1 --recurse-submodules ${cloneUrl} ${outputPath}
`;
await execAsyncRemote(serverId, command);
} catch (error) {
Expand Down Expand Up @@ -206,7 +208,7 @@ export const getBitbucketCloneCommand = async (
const cloneCommand = `
rm -rf ${outputPath};
mkdir -p ${outputPath};
if ! git clone --branch ${bitbucketBranch} --depth 1 --progress ${cloneUrl} ${outputPath} >> ${logPath} 2>&1; then
if ! git clone --branch ${bitbucketBranch} --depth 1 --recurse-submodules --progress ${cloneUrl} ${outputPath} >> ${logPath} 2>&1; then
echo "❌ [ERROR] Fail to clone the repository ${repoclone}" >> ${logPath};
exit 1;
fi
Expand Down
5 changes: 3 additions & 2 deletions packages/server/src/utils/providers/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const getCustomGitCloneCommand = async (
}

command.push(
`if ! git clone --branch ${customGitBranch} --depth 1 --progress ${customGitUrl} ${outputPath} >> ${logPath} 2>&1; then
`if ! git clone --branch ${customGitBranch} --depth 1 --recurse-submodules --progress ${customGitUrl} ${outputPath} >> ${logPath} 2>&1; then
echo "❌ [ERROR] Fail to clone the repository ${customGitUrl}" >> ${logPath};
exit 1;
fi
Expand Down Expand Up @@ -312,6 +312,7 @@ export const cloneGitRawRepository = async (entity: {
customGitBranch,
"--depth",
"1",
"--recurse-submodules",
customGitUrl,
outputPath,
"--progress",
Expand Down Expand Up @@ -391,7 +392,7 @@ export const cloneRawGitRepositoryRemote = async (compose: Compose) => {
}

command.push(
`if ! git clone --branch ${customGitBranch} --depth 1 --progress ${customGitUrl} ${outputPath} ; then
`if ! git clone --branch ${customGitBranch} --depth 1 --recurse-submodules --progress ${customGitUrl} ${outputPath} ; then
echo "[ERROR] Fail to clone the repository ";
exit 1;
fi
Expand Down
4 changes: 3 additions & 1 deletion packages/server/src/utils/providers/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const cloneGithubRepository = async (
branch!,
"--depth",
"1",
"--recurse-submodules",
cloneUrl,
outputPath,
"--progress",
Expand Down Expand Up @@ -204,7 +205,7 @@ export const getGithubCloneCommand = async (
const cloneCommand = `
rm -rf ${outputPath};
mkdir -p ${outputPath};
if ! git clone --branch ${branch} --depth 1 --progress ${cloneUrl} ${outputPath} >> ${logPath} 2>&1; then
if ! git clone --branch ${branch} --depth 1 --recurse-submodules --progress ${cloneUrl} ${outputPath} >> ${logPath} 2>&1; then
echo "❌ [ERROR] Fallo al clonar el repositorio ${repoclone}" >> ${logPath};
exit 1;
fi
Expand Down Expand Up @@ -239,6 +240,7 @@ export const cloneRawGithubRepository = async (entity: Compose) => {
branch!,
"--depth",
"1",
"--recurse-submodules",
cloneUrl,
outputPath,
"--progress",
Expand Down
6 changes: 4 additions & 2 deletions packages/server/src/utils/providers/gitlab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const cloneGitlabRepository = async (
gitlabBranch!,
"--depth",
"1",
"--recurse-submodules",
cloneUrl,
outputPath,
"--progress",
Expand Down Expand Up @@ -225,7 +226,7 @@ export const getGitlabCloneCommand = async (
const cloneCommand = `
rm -rf ${outputPath};
mkdir -p ${outputPath};
if ! git clone --branch ${gitlabBranch} --depth 1 --progress ${cloneUrl} ${outputPath} >> ${logPath} 2>&1; then
if ! git clone --branch ${gitlabBranch} --depth 1 --recurse-submodules --progress ${cloneUrl} ${outputPath} >> ${logPath} 2>&1; then
echo "❌ [ERROR] Fail to clone the repository ${repoclone}" >> ${logPath};
exit 1;
fi
Expand Down Expand Up @@ -361,6 +362,7 @@ export const cloneRawGitlabRepository = async (entity: Compose) => {
gitlabBranch!,
"--depth",
"1",
"--recurse-submodules",
cloneUrl,
outputPath,
"--progress",
Expand Down Expand Up @@ -395,7 +397,7 @@ export const cloneRawGitlabRepositoryRemote = async (compose: Compose) => {
try {
const command = `
rm -rf ${outputPath};
git clone --branch ${branch} --depth 1 ${cloneUrl} ${outputPath}
git clone --branch ${branch} --depth 1 --recurse-submodules ${cloneUrl} ${outputPath}
`;
await execAsyncRemote(serverId, command);
} catch (error) {
Expand Down

0 comments on commit 01e5cf0

Please sign in to comment.