fix: Expose ports for services

This commit is contained in:
Andras Bacsai
2022-05-09 15:18:25 +02:00
parent 24c655d7ef
commit 6ac8dd8907
10 changed files with 29 additions and 30 deletions

View File

@@ -135,7 +135,7 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`;
networks: [network],
environment: config.plausibleAnalytics.environmentVariables,
restart: 'always',
...(exposePort && { ports: [`${port}:${exposePort}`] }),
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
depends_on: [`${id}-postgresql`, `${id}-clickhouse`],
labels: makeLabelForServices('plausibleAnalytics'),
deploy: {
@@ -195,6 +195,7 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`;
}
};
const composeFileDestination = `${workdir}/docker-compose.yaml`;
console.log(JSON.stringify(composeFile, null, 2));
await fs.writeFile(composeFileDestination, yaml.dump(composeFile));
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull`);
await asyncExecShell(