Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More templates #613

Merged
merged 33 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3e0d4eb
feat: added mailserver template
SashaGoncharov19 Sep 17, 2024
0327334
fix: run pnpm check
SashaGoncharov19 Sep 17, 2024
a39a7a2
fix: clean after mailcow tests
SashaGoncharov19 Sep 17, 2024
706cde4
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Sep 20, 2024
8b855d7
feat: added erpnext template
SashaGoncharov19 Sep 20, 2024
d833623
Merge branch 'canary' into canary
SashaGoncharov19 Oct 4, 2024
059c21c
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Oct 13, 2024
bf48aa0
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Oct 21, 2024
4431f56
fix: run biome check
SashaGoncharov19 Oct 21, 2024
fbec26f
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Oct 26, 2024
1695c7c
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Oct 27, 2024
b7d4534
feat: influxdb template
SashaGoncharov19 Oct 27, 2024
15051a1
feat: infisical template
SashaGoncharov19 Oct 27, 2024
2a5a67e
feat: docmost template
SashaGoncharov19 Oct 27, 2024
527c01e
feat: vaultwarden template
SashaGoncharov19 Oct 27, 2024
bbef99c
feat: hi.events template
SashaGoncharov19 Oct 27, 2024
adea440
feat: windows os template
SashaGoncharov19 Oct 27, 2024
2821e43
feat: macos template
SashaGoncharov19 Oct 28, 2024
02d52d6
fix: uptime-kuma bump
SashaGoncharov19 Oct 28, 2024
bad11f1
fix: gitea bump
SashaGoncharov19 Oct 28, 2024
a4eb5c0
fix: soketi bump
SashaGoncharov19 Oct 28, 2024
25803f3
feat: coder template
SashaGoncharov19 Oct 28, 2024
de02a00
fix: coder template
SashaGoncharov19 Oct 28, 2024
a04b69d
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Oct 31, 2024
bba7d0c
Update apps/dokploy/templates/templates.ts
SashaGoncharov19 Nov 1, 2024
980024c
Merge branch 'Dokploy:canary' into canary
SashaGoncharov19 Nov 1, 2024
2da6506
Merge branch 'canary' into more-templates
SashaGoncharov19 Nov 1, 2024
2f8b89c
fix: nocodb bump
SashaGoncharov19 Nov 1, 2024
0468c25
fix: add missing images
mezotv Nov 3, 2024
e367799
Merge pull request #1 from mezotv/more-templates
SashaGoncharov19 Nov 3, 2024
e40a0fd
fix: remove erpnext/mailserver templates
SashaGoncharov19 Nov 3, 2024
84aac40
Merge remote-tracking branch 'origin/more-templates' into more-templates
SashaGoncharov19 Nov 3, 2024
2a24e1d
Update docker-compose.yml
Siumauricio Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/dokploy/public/templates/coder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/dokploy/public/templates/erpnext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions apps/dokploy/public/templates/hi-events.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/dokploy/public/templates/infisical.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/dokploy/public/templates/influxdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/dokploy/public/templates/macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/dokploy/public/templates/mailserver.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/dokploy/public/templates/windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions apps/dokploy/templates/coder/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
services:
coder:
image: ghcr.io/coder/coder:v2.15.3
networks:
- dokploy-network
volumes:
- /var/run/docker.sock:/var/run/docker.sock
group_add:
- "998"
depends_on:
db:
condition: service_healthy
environment:
- CODER_ACCESS_URL
- CODER_HTTP_ADDRESS
- CODER_PG_CONNECTION_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}?sslmode=disable

db:
image: postgres:17
networks:
- dokploy-network
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}",
]
interval: 5s
timeout: 5s
retries: 5
volumes:
- db_coder_data:/var/lib/postgresql/data

volumes:
db_coder_data:
30 changes: 30 additions & 0 deletions apps/dokploy/templates/coder/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";

export function generate(schema: Schema): Template {
const domains: DomainSchema[] = [
{
host: generateRandomDomain(schema),
port: 7080,
serviceName: "coder",
},
];

const envs = [
"CODER_ACCESS_URL=",
"CODER_HTTP_ADDRESS=0.0.0.0:7080",
"",
"POSTGRES_DB=coder",
"POSTGRES_USER=coder",
"POSTGRES_PASSWORD=VERY_STRONG_PASSWORD",
];

return {
domains,
envs,
};
}
47 changes: 47 additions & 0 deletions apps/dokploy/templates/docmost/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: "3"

services:
docmost:
image: docmost/docmost:0.4.1
depends_on:
- db
- redis
environment:
- APP_URL
- APP_SECRET
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public
- REDIS_URL=redis://redis:6379
restart: unless-stopped
networks:
- dokploy-network
volumes:
- docmost:/app/data/storage

db:
image: postgres:16-alpine
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
restart: unless-stopped
networks:
- dokploy-network
volumes:
- db_docmost_data:/var/lib/postgresql/data

redis:
image: redis:7.2-alpine
restart: unless-stopped
networks:
- dokploy-network
volumes:
- redis_docmost_data:/data

networks:
dokploy-network:
external: true

volumes:
docmost:
db_docmost_data:
redis_docmost_data:
29 changes: 29 additions & 0 deletions apps/dokploy/templates/docmost/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";

export function generate(schema: Schema): Template {
const domains: DomainSchema[] = [
{
host: generateRandomDomain(schema),
port: 3000,
serviceName: "docmost",
},
];

const envs = [
"POSTGRES_DB=docmost",
"POSTGRES_USER=docmost",
"POSTGRES_PASSWORD=STRONG_DB_PASSWORD",
"APP_URL=http://localhost:3000",
"APP_SECRET=VERY_STRONG_SECRET",
];

return {
domains,
envs,
};
}
211 changes: 211 additions & 0 deletions apps/dokploy/templates/erpnext/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
services:
backend:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: on-failure
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs

configurator:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: none
entrypoint:
- bash
- -c
# add redis_socketio for backward compatibility
command:
- >
ls -1 apps > sites/apps.txt;
bench set-config -g db_host $$DB_HOST;
bench set-config -gp db_port $$DB_PORT;
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
bench set-config -g redis_socketio "redis://$$REDIS_QUEUE";
bench set-config -gp socketio_port $$SOCKETIO_PORT;
environment:
DB_HOST: db
DB_PORT: "3306"
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
SOCKETIO_PORT: "9000"
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs

create-site:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: none
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
entrypoint:
- bash
- -c
command:
- >
wait-for-it -t 120 db:3306;
wait-for-it -t 120 redis-cache:6379;
wait-for-it -t 120 redis-queue:6379;
export start=`date +%s`;
until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]];
do
echo "Waiting for sites/common_site_config.json to be created";
sleep 5;
if (( `date +%s`-start > 120 )); then
echo "could not find sites/common_site_config.json with required keys";
exit 1
fi
done;
echo "sites/common_site_config.json found";
bench new-site --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend;

db:
image: mariadb:10.6
healthcheck:
test: mysqladmin ping -h localhost --password=admin
interval: 1s
retries: 15
deploy:
restart_policy:
condition: on-failure
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
environment:
MYSQL_ROOT_PASSWORD: admin
networks:
- dokploy-network
volumes:
- db-data:/var/lib/mysql

frontend:
image: frappe/erpnext:v15.35.1
depends_on:
- websocket
deploy:
restart_policy:
condition: on-failure
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
FRAPPE_SITE_NAME_HEADER: frontend
SOCKETIO: websocket:9000
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
UPSTREAM_REAL_IP_RECURSIVE: "off"
PROXY_READ_TIMEOUT: 120
CLIENT_MAX_BODY_SIZE: 50m
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
ports:
- "8080:8080"

queue-long:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: on-failure
command:
- bench
- worker
- --queue
- long,default,short
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs

queue-short:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: on-failure
command:
- bench
- worker
- --queue
- short,default
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs

redis-queue:
image: redis:6.2-alpine
deploy:
restart_policy:
condition: on-failure
networks:
- dokploy-network
volumes:
- redis-queue-data:/data

redis-cache:
image: redis:6.2-alpine
deploy:
restart_policy:
condition: on-failure
networks:
- dokploy-network
volumes:
- redis-cache-data:/data

scheduler:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: on-failure
command:
- bench
- schedule
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs

websocket:
image: frappe/erpnext:v15.35.1
deploy:
restart_policy:
condition: on-failure
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
networks:
- dokploy-network
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs

volumes:
db-data:
redis-queue-data:
redis-cache-data:
sites:
logs:
networks:
dokploy-network:
external: true
SashaGoncharov19 marked this conversation as resolved.
Show resolved Hide resolved
22 changes: 22 additions & 0 deletions apps/dokploy/templates/erpnext/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";

export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);

const domains: DomainSchema[] = [
{
host: mainDomain,
port: 8080,
serviceName: "frontend",
},
];

return {
domains,
};
}
Loading