update dev container flow

This commit is contained in:
Andras Bacsai
2022-10-06 11:37:42 +02:00
parent ec97e04fd4
commit 680b20d199
2 changed files with 8 additions and 3 deletions

View File

@@ -468,9 +468,9 @@ export const saveBuildLog = async ({
line = line.replace(regex, '<SENSITIVE_DATA_DELETED>@'); line = line.replace(regex, '<SENSITIVE_DATA_DELETED>@');
} }
const addTimestamp = `[${generateTimestamp()}] ${line}`; const addTimestamp = `[${generateTimestamp()}] ${line}`;
const fluentBitUrl = isDev ? 'http://localhost:24224' : 'http://coolify-fluentbit:24224'; const fluentBitUrl = isDev ? process.env.COOLIFY_CONTAINER_DEV === 'true' ? 'http://coolify-fluentbit:24224' : 'http://localhost:24224' : 'http://coolify-fluentbit:24224';
if (isDev) { if (isDev && !process.env.COOLIFY_CONTAINER_DEV) {
console.debug(`[${applicationId}] ${addTimestamp}`); console.debug(`[${applicationId}] ${addTimestamp}`);
} }
try { try {

View File

@@ -7,6 +7,7 @@ services:
dockerfile: Dockerfile-dev dockerfile: Dockerfile-dev
command: bash -c 'pnpm install && pnpm db:push && pnpm db:seed && pnpm dev' command: bash -c 'pnpm install && pnpm db:push && pnpm db:seed && pnpm dev'
environment: environment:
- COOLIFY_CONTAINER_DEV=true
- COOLIFY_APP_ID=random-local-id - COOLIFY_APP_ID=random-local-id
- COOLIFY_SECRET_KEY=12341234123412341234123412341234 - COOLIFY_SECRET_KEY=12341234123412341234123412341234
- COOLIFY_DATABASE_URL=file:../db/dev.db - COOLIFY_DATABASE_URL=file:../db/dev.db
@@ -29,6 +30,7 @@ services:
volumes: volumes:
- ./:/app - ./:/app
- '/var/run/docker.sock:/var/run/docker.sock' - '/var/run/docker.sock:/var/run/docker.sock'
- /tmp:/tmp
networks: networks:
- coolify-infra - coolify-infra
fluent-bit: fluent-bit:
@@ -38,7 +40,10 @@ services:
volumes: volumes:
- ./logs:/logs - ./logs:/logs
ports: ports:
- "24224:24224" - target: 24224
published: 24224
protocol: tcp
mode: host
networks: networks:
- coolify-infra - coolify-infra
networks: networks: