mirror of
https://github.com/meienberger/runtipi.git
synced 2024-08-17 08:00:26 +03:00
fix(worker): use correct path for ssl cert output
This commit is contained in:
parent
aa3571282f
commit
8e15727bae
@ -75,10 +75,12 @@ COPY ./pnpm-lock.yaml ./
|
|||||||
RUN pnpm fetch --ignore-scripts
|
RUN pnpm fetch --ignore-scripts
|
||||||
|
|
||||||
COPY ./pnpm-workspace.yaml ./
|
COPY ./pnpm-workspace.yaml ./
|
||||||
COPY ./packages ./packages
|
COPY ./packages/worker/package.json ./packages/worker/package.json
|
||||||
|
COPY ./packages/shared/package.json ./packages/shared/package.json
|
||||||
|
|
||||||
RUN pnpm install -r --prefer-offline
|
RUN pnpm install -r --prefer-offline
|
||||||
|
|
||||||
|
COPY ./packages ./packages
|
||||||
COPY ./packages/worker/build.js ./packages/worker/build.js
|
COPY ./packages/worker/build.js ./packages/worker/build.js
|
||||||
COPY ./packages/worker/src ./packages/worker/src
|
COPY ./packages/worker/src ./packages/worker/src
|
||||||
COPY ./packages/worker/package.json ./packages/worker/package.json
|
COPY ./packages/worker/package.json ./packages/worker/package.json
|
||||||
|
@ -268,10 +268,15 @@ export const generateTlsCertificates = async (data: { domain?: string }) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info(`Generating TLS certificate for ${data.domain}`);
|
logger.info(`Generating TLS certificate for ${data.domain}`);
|
||||||
await execAsync(
|
const { stderr } = await execAsync(
|
||||||
`openssl req -x509 -newkey rsa:4096 -keyout /app/traefik/tls/key.pem -out /app/traefik/tls/cert.pem -days 365 -subj "${subject}" -addext "subjectAltName = ${subjectAltName}" -nodes`,
|
`openssl req -x509 -newkey rsa:4096 -keyout ${DATA_DIR}/traefik/tls/key.pem -out ${DATA_DIR}/traefik/tls/cert.pem -days 365 -subj "${subject}" -addext "subjectAltName = ${subjectAltName}" -nodes`,
|
||||||
);
|
);
|
||||||
|
if (!(await pathExists(path.join(tlsFolder, 'cert.pem'))) || !(await pathExists(path.join(tlsFolder, 'key.pem')))) {
|
||||||
|
logger.error(`Failed to generate TLS certificate for ${data.domain}`);
|
||||||
|
logger.error(stderr);
|
||||||
|
} else {
|
||||||
logger.info(`Writing txt file for ${data.domain}`);
|
logger.info(`Writing txt file for ${data.domain}`);
|
||||||
|
}
|
||||||
await fs.promises.writeFile(path.join(tlsFolder, `${data.domain}.txt`), '');
|
await fs.promises.writeFile(path.join(tlsFolder, `${data.domain}.txt`), '');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
|
@ -17,4 +17,4 @@ cd /dashboard || exit
|
|||||||
pm2 start npm --name dashboard -- run start
|
pm2 start npm --name dashboard -- run start
|
||||||
|
|
||||||
# Log apps realtime
|
# Log apps realtime
|
||||||
pm2 logs --raw
|
pm2 logs --raw --lines 1000
|
||||||
|
Loading…
Reference in New Issue
Block a user