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

fix(template): actualbudget healthcheck, gotenberg healthcheck & network #1124

Open
wants to merge 8 commits into
base: canary
Choose a base branch
from
5 changes: 5 additions & 0 deletions apps/dokploy/templates/actualbudget/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ services:
volumes:
- actual-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "bash -c ':> /dev/tcp/127.0.0.1/5006' || exit 1"]
interval: 30s
timeout: 10s
retries: 3

volumes:
actual-data:
33 changes: 23 additions & 10 deletions apps/dokploy/templates/gotenberg/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,29 @@ services:
image: gotenberg/gotenberg:latest
environment:
# NOTE: requires the --api-enable-basic-auth option in "command"
# make sure to also change the credentials in Dokploy environment
GOTENBERG_API_BASIC_AUTH_USERNAME: ${GOTENBERG_API_BASIC_AUTH_USERNAME}
GOTENBERG_API_BASIC_AUTH_PASSWORD: ${GOTENBERG_API_BASIC_AUTH_PASSWORD}
command: [
"gotenberg",
command:
- gotenberg
# See the full list of options at https://gotenberg.dev/docs/configuration

# Examples:
"--api-enable-basic-auth"
#"--api-timeout=60s",
#"--chromium-auto-start"
]
restart: unless-stopped
- "--api-enable-basic-auth"
# - "--api-timeout=60s"
# - "--chromium-auto-start"

# If you want to horizontally scale gotenberg
#deploy:
# replicas: 3
# restart_policy:
# condition: on-failure

networks:
- dokploy-network
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000/health"]
interval: 30s
timeout: 10s
retries: 3

networks:
dokploy-network:
external: true
18 changes: 2 additions & 16 deletions apps/dokploy/templates/gotenberg/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";
import { type Schema, type Template, generatePassword } from "../utils";

export function generate(schema: Schema): Template {
const username = "gotenberg";
const password = "changethis";

const domains: DomainSchema[] = [
{
host: generateRandomDomain(schema),
port: 3000,
serviceName: "gotenberg",
},
];
const password = generatePassword(32);

const envs = [
`GOTENBERG_API_BASIC_AUTH_USERNAME=${username}`,
Expand All @@ -24,6 +11,5 @@ export function generate(schema: Schema): Template {

return {
envs,
domains,
};
}