mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #596 from Dokploy/595-dokploy-internal-postgres-database-is-publicly-accessible-by-default
fix(dokploy): remove expose ports in production
This commit is contained in:
@@ -32,16 +32,18 @@ export const initializePostgres = async () => {
|
|||||||
Replicas: 1,
|
Replicas: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
EndpointSpec: {
|
...(process.env.NODE_ENV === "development" && {
|
||||||
Ports: [
|
EndpointSpec: {
|
||||||
{
|
Ports: [
|
||||||
TargetPort: 5432,
|
{
|
||||||
PublishedPort: process.env.NODE_ENV === "development" ? 5432 : 0,
|
TargetPort: 5432,
|
||||||
Protocol: "tcp",
|
PublishedPort: 5432,
|
||||||
PublishMode: "host",
|
Protocol: "tcp",
|
||||||
},
|
PublishMode: "host",
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
await pullImage(imageName);
|
await pullImage(imageName);
|
||||||
|
|||||||
@@ -29,16 +29,18 @@ export const initializeRedis = async () => {
|
|||||||
Replicas: 1,
|
Replicas: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
EndpointSpec: {
|
...(process.env.NODE_ENV === "development" && {
|
||||||
Ports: [
|
EndpointSpec: {
|
||||||
{
|
Ports: [
|
||||||
TargetPort: 6379,
|
{
|
||||||
PublishedPort: process.env.NODE_ENV === "development" ? 6379 : 0,
|
TargetPort: 6379,
|
||||||
Protocol: "tcp",
|
PublishedPort: 6379,
|
||||||
PublishMode: "host",
|
Protocol: "tcp",
|
||||||
},
|
PublishMode: "host",
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
await pullImage(imageName);
|
await pullImage(imageName);
|
||||||
|
|||||||
Reference in New Issue
Block a user