Skip to content

Commit

Permalink
fix(proxy): update options
Browse files Browse the repository at this point in the history
  • Loading branch information
syfxlin committed Oct 25, 2023
1 parent 831fb86 commit f95d2b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 50 deletions.
44 changes: 0 additions & 44 deletions README-zh.md

This file was deleted.

9 changes: 6 additions & 3 deletions src/modules/proxy/proxy.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,14 @@ export class ProxyModule implements DepkerModule {
...config.labels,
},
Envs: {
// dashboard
// basic config
TRAEFIK_PING: "true",
TRAEFIK_API: "true",
TRAEFIK_API_DASHBOARD: "true",
// healthcheck
TRAEFIK_PING: "true",
TRAEFIK_SERVERSTRANSPORT_INSECURESKIPVERIFY: "true",
TRAEFIK_SERVERSTRANSPORT_FORWARDINGTIMEOUTS_DIALTIMEOUT: "30",
TRAEFIK_SERVERSTRANSPORT_FORWARDINGTIMEOUTS_IDLECONNTIMEOUT: "90",
TRAEFIK_SERVERSTRANSPORT_FORWARDINGTIMEOUTS_RESPONSEHEADERTIMEOUT: "0",
// entry points
TRAEFIK_ENTRYPOINTS_HTTP: "true",
TRAEFIK_ENTRYPOINTS_HTTP_ADDRESS: ":80",
Expand Down
6 changes: 3 additions & 3 deletions src/modules/service/pack.context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class PackContext<Config extends ServiceConfig = ServiceConfig> {
};

// write secrets
if (config.secrets) {
if (config.secrets && options.Secrets) {
// prettier-ignore
const values = Object.entries(config.secrets).map(([k, v]) => `${k}=${v}\n`);
if (values.length) {
Expand All @@ -237,12 +237,12 @@ export class PackContext<Config extends ServiceConfig = ServiceConfig> {
options.Secrets.envs = file2;
}
}
if (!options.Secrets?.secrets) {
if (!options.Secrets?.secrets && options.Secrets) {
const file = await Deno.makeTempFile();
await Deno.writeTextFile(file, "\n");
options.Secrets.secrets = file;
}
if (!options.Secrets?.envs) {
if (!options.Secrets?.envs && options.Secrets) {
const file = await Deno.makeTempFile();
await Deno.writeTextFile(file, "\n");
options.Secrets.envs = file;
Expand Down

0 comments on commit f95d2b2

Please sign in to comment.