Commit Graph

26 Commits

Author SHA1 Message Date
6761dbf419 test(docker-compose): add further tests regrading depends_on
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-02-25 16:21:13 +01:00
ab282e5173 feat: support depends_on
All checks were successful
continuous-integration/drone/push Build is passing
This PR supports the extended pattern of `depends_on`. If the short version of
`depends_on` is defined, it will be migrated to the extended version like the
example below:

```yaml
services:
  web:
    depends_on
    - database

services:
  web:
    depends_on:
      database:
        condition: service_started
```

All three types of merging strategies are supported.
2025-02-24 22:44:11 +01:00
003db26fe5 feat: respect individual ports instead of replacing the entire slice of ports
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
The following patch adapts the logic of the merge strategy existing and last
win for service ports.

In the past, the complete object has been replaced based on the merge strategy.
This behavior has been adapted, that each port should now considered
individually per strategy.

Both strategies now focus on the src port of the host system. With a last-win,
the dest port of the container is overwritten with an existing src port.

```diff
  service:
    my-app:
      ports:
- - 0.0.0.0:8080:80
+ - 0.0.0.0:8080:8080
      - 0.0.0.0:8443:8443
```

The situation is different with the existing win strategy. There, the destination
port can no longer be changed once there is a connection with a sourc port.
2025-02-21 13:55:53 +01:00
f8b4fe9af6 fix(dockerCompoe): compare srcIP and srcPort of mergeExistingWinPorts() 2025-02-21 09:51:53 +01:00
b45f8181aa style(lint): block unused parameter
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-20 17:26:43 +01:00
13301cb367 fix(dockerCompose): add further methods of port
This patch adds the following methods:

ports.ExistsDstIP()
ports.ExistsDstPort()
ports.ExistsProtocol()
ports.ExistsSrcIP()
ports.ExistsSrcPort()
ports.GetDstIP()
ports.GetDstPort()
ports.GetProtocol()
ports.GetSrcIP()
ports.GetSrcPort()
2025-02-20 17:26:43 +01:00
0a68b2d8e7 fix(dockerCompose): add port.ExistProtocol 2025-02-20 17:26:43 +01:00
f2dc3d5174 fix(fetcher): handle all os.Stat() errors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-12-03 11:09:38 +01:00
5dea30fec0 fix(domain): iterate when merging over custom configs
The normal dcmerge did not work, as the check and addition was only
possible if at least one attribute such as service, network or volume
was presentThe normal dcmerge did not work, as the check and addition
was only possible if at least one attribute such as service, network or
volume was present.

The logic was adjusted.

The logic was adjusted.
2023-11-25 18:21:07 +01:00
8b68c9587c feat: support depends_on 2023-11-25 18:21:07 +01:00
751bb810d2 fix(dockerCompose): protect of empty attributes 2023-08-28 11:37:24 +02:00
9b469bd8c6 fix: rename firstWin to existingWin 2023-08-28 11:13:32 +02:00
2ea83b7591 fix(dockerCompose): add MergeFirstWin() 2023-08-28 10:57:36 +02:00
d9ecf068c9 fix(dockerCompose): add Service.MergeFirstWin() 2023-08-28 10:57:36 +02:00
4c3c6cd5d2 fix(dockerCompose): add ServiceDeploy.MergeFirstWin() 2023-08-28 10:57:36 +02:00
23290fbd5d fix(dockerCompose): add ServiceDeployResources.MergeFirstWin() 2023-08-28 10:57:36 +02:00
07673bfd53 fix(dockerCompose): add ServiceDeployResourcesLimits.MergeFirstWin() 2023-08-28 10:57:36 +02:00
405a0258f1 fix(dockerCompose): add ServiceNetwork.MergeFirstWin() 2023-08-28 10:57:36 +02:00
462299d5cd fix(dockerCompose): add ServiceUlimits.MergeFirstWin() 2023-08-28 10:57:36 +02:00
6524785871 test(dockerCompose): add ServiceUlimitsNoFile.MergeFirstWin() 2023-08-28 10:57:36 +02:00
1207bcfcab test(dockerCompose): add Volume.MergeFirstWin() 2023-08-28 10:57:36 +02:00
a656dc2db1 fix(dockerCompose): add ServiceUlimitsNoFile.MergeFirstWin() 2023-08-28 10:57:36 +02:00
14c645dd96 fix(dockerCompose): add Volume.MergeFirstWin() 2023-08-28 10:57:36 +02:00
ce48d6dd0c fix(dockerCompose): mergeLastWinImage
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-26 14:44:12 +02:00
c50c0a835e fix(gomod): downgrade to yaml v2.0
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-26 10:17:32 +02:00
3777c49ee9 Initial Commit
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-07-26 09:57:40 +02:00