Set up docker and docker-compose configs for use with logging and repl
This commit is contained in:
parent
8dbd4d837f
commit
4bde082799
|
@ -22,3 +22,5 @@ packages/pwa/dist
|
|||
packages/server/logs
|
||||
packages/server/data
|
||||
packages/server/attachments
|
||||
logs
|
||||
pwa
|
||||
|
|
|
@ -4,11 +4,13 @@ ENV PL_SERVER_PORT=3000
|
|||
ENV PL_BILLING_PORT=4000
|
||||
ENV PL_DB_PATH=/data
|
||||
ENV PL_ATTACHMENTS_PATH=/docs
|
||||
ENV PL_LOG_DIR=/logs
|
||||
ENV PL_REPL_HISTORY=.pl_repl_history
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 4000
|
||||
|
||||
VOLUME ["/data", "/docs"]
|
||||
VOLUME ["/data", "/docs", "/logs"]
|
||||
|
||||
WORKDIR /padloc
|
||||
|
||||
|
|
|
@ -16,12 +16,12 @@ services:
|
|||
- PL_BILLING_STRIPE_SECRET
|
||||
- PL_MFA
|
||||
- PL_REPL_PORT
|
||||
- PL_REPL_HISTORY
|
||||
ports:
|
||||
- $PL_SERVER_PORT:3000
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./docs:/docs
|
||||
- ./logs:/logs
|
||||
pwa:
|
||||
build:
|
||||
context: .
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"server:start": "lerna run start --scope @padloc/server",
|
||||
"start": "npm run pwa:build && lerna run --scope '@padloc/{server,pwa}' --parallel start",
|
||||
"dev": "lerna run --parallel dev",
|
||||
"repl": "lerna run repl --scope @padloc/server",
|
||||
"repl": "cd packages/server && npm run repl && cd ../..",
|
||||
"test": "lerna run test"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ export class Logger {
|
|||
from,
|
||||
to,
|
||||
offset = 0,
|
||||
limit = 100,
|
||||
limit = 50,
|
||||
type,
|
||||
account,
|
||||
org,
|
||||
|
|
|
@ -328,14 +328,14 @@ export class ReplSession {
|
|||
this.print(
|
||||
[
|
||||
`${colors.bold(events.length.toString())} Events found:`,
|
||||
[col("Time", 19), col("Type", 15), col("Account", 20), col("ID", 50)]
|
||||
[col("Time", 19), col("Type", 20), col("Account", 20), col("ID", 50)]
|
||||
.map(c => colors.bold.underline(c))
|
||||
.join(" "),
|
||||
...events.map(e =>
|
||||
[
|
||||
col(format(e.time, "yyyy-MM-dd hh:mm:ss"), 19),
|
||||
colors.bold(col(e.type, 15)),
|
||||
col((e.data.account && e.data.account.email) || "N/A", 20),
|
||||
colors.bold(col(e.type, 20)),
|
||||
col((e.data.account && e.data.account.email || e.data.email) || "N/A", 20),
|
||||
colors.dim(e.id)
|
||||
].join(" ")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue