mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #344 from Dokploy/340-dokploy-postgres-and-redis-are-exposed
fix(services): set published port 0 to prevent swarm assign random po…
This commit is contained in:
@@ -36,10 +36,9 @@ export const initializePostgres = async () => {
|
|||||||
Ports: [
|
Ports: [
|
||||||
{
|
{
|
||||||
TargetPort: 5432,
|
TargetPort: 5432,
|
||||||
...(process.env.NODE_ENV === "development"
|
PublishedPort: process.env.NODE_ENV === "development" ? 5432 : 0,
|
||||||
? { PublishedPort: 5432 }
|
|
||||||
: {}),
|
|
||||||
Protocol: "tcp",
|
Protocol: "tcp",
|
||||||
|
PublishMode: "host",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,10 +33,9 @@ export const initializeRedis = async () => {
|
|||||||
Ports: [
|
Ports: [
|
||||||
{
|
{
|
||||||
TargetPort: 6379,
|
TargetPort: 6379,
|
||||||
...(process.env.NODE_ENV === "development"
|
PublishedPort: process.env.NODE_ENV === "development" ? 6379 : 0,
|
||||||
? { PublishedPort: 6379 }
|
|
||||||
: {}),
|
|
||||||
Protocol: "tcp",
|
Protocol: "tcp",
|
||||||
|
PublishMode: "host",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user