File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ export const getDockerResourceType = async (
277
277
const { stdout } = await execAsync ( command ) ;
278
278
result = stdout . trim ( ) ;
279
279
}
280
+ console . log ( "result" , result ) ;
280
281
if ( result === "service" ) {
281
282
return "service" ;
282
283
}
@@ -291,11 +292,14 @@ export const reloadDockerResource = async (
291
292
serverId ?: string ,
292
293
) => {
293
294
const resourceType = await getDockerResourceType ( resourceName , serverId ) ;
295
+ console . log ( "resourceType" , resourceType ) ;
294
296
let command = "" ;
295
297
if ( resourceType === "service" ) {
296
298
command = `docker service update --force ${ resourceName } ` ;
297
- } else {
299
+ } else if ( resourceType === "standalone" ) {
298
300
command = `docker restart ${ resourceName } ` ;
301
+ } else {
302
+ throw new Error ( "Resource type not found" ) ;
299
303
}
300
304
if ( serverId ) {
301
305
await execAsyncRemote ( serverId , command ) ;
Original file line number Diff line number Diff line change @@ -578,15 +578,16 @@ export const createTraefikInstance = () => {
578
578
TRAEFIK_VERSION=${ TRAEFIK_VERSION }
579
579
docker run -d \
580
580
--name dokploy-traefik \
581
- --network dokploy-network \
582
- --restart unless-stopped \
581
+ --restart always \
583
582
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml \
584
583
-v /etc/dokploy/traefik/dynamic:/etc/dokploy/traefik/dynamic \
585
584
-v /var/run/docker.sock:/var/run/docker.sock \
586
585
-p ${ TRAEFIK_SSL_PORT } :${ TRAEFIK_SSL_PORT } \
587
586
-p ${ TRAEFIK_PORT } :${ TRAEFIK_PORT } \
588
587
-p ${ TRAEFIK_HTTP3_PORT } :${ TRAEFIK_HTTP3_PORT } /udp \
589
588
traefik:v$TRAEFIK_VERSION
589
+
590
+ docker network connect dokploy-network dokploy-traefik;
590
591
echo "Traefik version $TRAEFIK_VERSION installed ✅"
591
592
fi
592
593
` ;
You can’t perform that action at this time.
0 commit comments